diff options
author | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2017-10-09 16:26:03 +0200 |
---|---|---|
committer | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2017-10-09 17:09:53 +0200 |
commit | 1fcba7ea7a9f2878bc3188149b5f3900150bf003 (patch) | |
tree | 98109ef758f252eec7802192558a97a50c59ed50 | |
parent | 0894e2b18a3c882c53ee96583c23944e70572c7a (diff) | |
download | ocaml-1fcba7ea7a9f2878bc3188149b5f3900150bf003.tar.gz |
ocamltest: simplify tests and actions a bit
Now that actions can occur directly in test blocks, it is no longer
necessary to wrap each action in a test. This commit thus removes
all the single-action tests.
It also renames a few actions to give them simpler names.
-rw-r--r-- | ocamltest/builtin_actions.ml | 18 | ||||
-rw-r--r-- | ocamltest/builtin_tests.ml | 14 | ||||
-rw-r--r-- | ocamltest/builtin_tests.mli | 4 |
3 files changed, 9 insertions, 27 deletions
diff --git a/ocamltest/builtin_actions.ml b/ocamltest/builtin_actions.ml index 105a804b32..c0333725d1 100644 --- a/ocamltest/builtin_actions.ml +++ b/ocamltest/builtin_actions.ml @@ -524,7 +524,7 @@ let compile_test_program program_variable compiler log env = (* Compile actions *) let compile_bytecode_with_bytecode_compiler = { - action_name = "compile-bytecode-with-bytecode-compiler"; + action_name = "ocamlc.byte"; action_environment = env_id; action_body = compile_test_program @@ -532,7 +532,7 @@ let compile_bytecode_with_bytecode_compiler = { } let compile_bytecode_with_native_compiler = { - action_name = "compile-bytecode-with-native-compiler"; + action_name = "ocamlc.opt"; action_environment = env_id; action_body = compile_test_program @@ -540,7 +540,7 @@ let compile_bytecode_with_native_compiler = { } let compile_native_with_bytecode_compiler = { - action_name = "compile-native-with-bytecode-compiler"; + action_name = "ocamlopt.byte"; action_environment = env_id; action_body = compile_test_program @@ -548,7 +548,7 @@ let compile_native_with_bytecode_compiler = { } let compile_native_with_native_compiler = { - action_name = "compile-native-with-native-compiler"; + action_name = "ocamlopt.opt"; action_environment = env_id; action_body = compile_test_program @@ -597,7 +597,7 @@ let execute_program = Builtin_variables.arguments let execute = { - action_name = "execute-program"; + action_name = "run"; action_environment = env_id; action_body = execute_program } @@ -618,7 +618,7 @@ let run_script log env = log env let script = { - action_name = "run-script"; + action_name = "script"; action_environment = env_id; action_body = run_script } @@ -628,7 +628,7 @@ let run_expect log env = run_script log newenv let expect = { - action_name = "run-expect"; + action_name = "expect"; action_environment = env_id; action_body = run_expect } @@ -862,14 +862,14 @@ let run_test_program_in_toplevel toplevel log env = let run_in_ocaml = { - action_name = "run-in-bytecode-toplevel"; + action_name = "ocaml"; action_environment = env_id; action_body = run_test_program_in_toplevel ocaml; } let run_in_ocamlnat = { - action_name = "run-in-native-toplevel"; + action_name = "ocamlnat"; action_environment = env_id; action_body = run_test_program_in_toplevel ocamlnat; } diff --git a/ocamltest/builtin_tests.ml b/ocamltest/builtin_tests.ml index 59af5c51df..9e8d85c288 100644 --- a/ocamltest/builtin_tests.ml +++ b/ocamltest/builtin_tests.ml @@ -37,12 +37,6 @@ let bytecode = ] @ (if Ocamltest_config.arch<>"none" then opt_actions else []) } -let expect = { - test_name = "expect"; - test_run_by_default = false; - test_actions = [expect]; -} - let native = { test_name = "native"; test_run_by_default = true; @@ -58,12 +52,6 @@ let native = { ] } -let script = { - test_name = "script"; - test_run_by_default = false; - test_actions = [script]; -} - let toplevel = { test_name = "toplevel"; test_run_by_default = false; @@ -82,8 +70,6 @@ let _ = List.iter register [ bytecode; - expect; - script; toplevel; ]; if (Ocamltest_config.arch <> "none") then register native diff --git a/ocamltest/builtin_tests.mli b/ocamltest/builtin_tests.mli index 2a223d0bbb..271bf346d1 100644 --- a/ocamltest/builtin_tests.mli +++ b/ocamltest/builtin_tests.mli @@ -17,10 +17,6 @@ val bytecode : Tests.t -val expect : Tests.t - val native : Tests.t -val script : Tests.t - val toplevel : Tests.t |