Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
562fa575
Commit
562fa575
authored
10 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
qemu-arm: Handle sys.exit() to allow skip tests in testsuite.
parent
992284be
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
qemu-arm/mpconfigport.h
+1
-0
1 addition, 0 deletions
qemu-arm/mpconfigport.h
qemu-arm/test_main.c
+9
-1
9 additions, 1 deletion
qemu-arm/test_main.c
with
10 additions
and
1 deletion
qemu-arm/mpconfigport.h
+
1
−
0
View file @
562fa575
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#define MICROPY_PY_BUILTINS_FROZENSET (1)
#define MICROPY_PY_BUILTINS_FROZENSET (1)
#define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
#define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
#define MICROPY_PY_IO (0)
#define MICROPY_PY_IO (0)
#define MICROPY_PY_SYS_EXIT (1)
// type definitions for the specific machine
// type definitions for the specific machine
...
...
This diff is collapsed.
Click to expand it.
qemu-arm/test_main.c
+
9
−
1
View file @
562fa575
...
@@ -31,7 +31,15 @@ inline void do_str(const char *src) {
...
@@ -31,7 +31,15 @@ inline void do_str(const char *src) {
mp_call_function_0
(
module_fun
);
mp_call_function_0
(
module_fun
);
nlr_pop
();
nlr_pop
();
}
else
{
}
else
{
mp_obj_print_exception
(
printf_wrapper
,
NULL
,
(
mp_obj_t
)
nlr
.
ret_val
);
mp_obj_t
exc
=
(
mp_obj_t
)
nlr
.
ret_val
;
if
(
mp_obj_is_subclass_fast
(
mp_obj_get_type
(
exc
),
&
mp_type_SystemExit
))
{
// Assume that sys.exit() is called to skip the test.
// TODO: That can be always true, we should set up convention to
// use specific exit code as skip indicator.
tinytest_set_test_skipped_
();
return
;
}
mp_obj_print_exception
(
printf_wrapper
,
NULL
,
exc
);
tt_abort_msg
(
"Uncaught exception"
);
tt_abort_msg
(
"Uncaught exception"
);
}
}
end:
end:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment