Reordered cmake file from cli.
@@ -176,11 +176,22 @@ else()
set(GREP_COMMAND grep)
endif()
+include(TestEnvironmentVariables)
+
add_test(NAME ${target}
COMMAND ${TEST_COMMAND} "echo 'load mock a.mock\ninspect\nexit' | $<TARGET_FILE:${target}> | ${GREP_COMMAND} \"function three_str(a_str, b_str, c_str)\""
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
+set_property(TEST ${target}
+ PROPERTY LABELS ${target}
+)
+
+test_environment_variables(${target}
+ ""
+ ${TESTS_ENVIRONMENT_VARIABLES}
+)
+
#
# Define dependencies
#
@@ -202,17 +213,6 @@ add_loader_dependencies(${target}
# Define tests
#
-set_property(TEST ${target}
- PROPERTY LABELS ${target}
-)
-
-include(TestEnvironmentVariables)
-
-test_environment_variables(${target}
- ""
- ${TESTS_ENVIRONMENT_VARIABLES}
-)
-
if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_NODE AND OPTION_BUILD_SCRIPTS AND OPTION_BUILD_SCRIPTS_NODE)
add_test(NAME ${target}-node
COMMAND ${TEST_COMMAND} "echo 'load node nod.js\ninspect\ncall hello_boy(300, 400)\nexit' | $<TARGET_FILE:${target}> | ${GREP_COMMAND} \"700.0\""
