Add better support for proper installation after build (#2370)

- Add `--install` option to `tools/build.py`.
- Make use of `--install` in `tools/run-tests.py` by testing the
  installed the executables instead of those in the build tree.

Related changes:
- Collect unit test binaries in the `tests` subdir of the build
  tree instead of `bin`.
- The `ls`-based collection of the unit test binaries had some
  shortcomings hitherto unrevealed (it didn't filter for files so
  it could potentially "collect" dictionaries, too), which has now
  been replaced with a more stable `find`-based solution.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2018-06-04 03:55:29 +02:00
committed by yichoi
parent 2cabb6f8ea
commit 71471a0416
9 changed files with 41 additions and 26 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ foreach(SOURCE_UNIT_TEST_EXT ${SOURCE_UNIT_TEST_EXT_MODULES})
set(TARGET_NAME unit-${TARGET_NAME})
add_executable(${TARGET_NAME} ${SOURCE_UNIT_TEST_EXT})
set_property(TARGET ${TARGET_NAME}
PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}")
set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}")
set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
target_link_libraries(${TARGET_NAME} jerry-ext jerry-core jerry-port-default-minimal)
+1
View File
@@ -24,5 +24,6 @@ endif()
add_executable(${JERRYX_MODULE_UNITTEST_NAME} ${JERRYX_MODULE_UNIT_TEST_SOURCES})
set_property(TARGET ${JERRYX_MODULE_UNITTEST_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}")
set_property(TARGET ${JERRYX_MODULE_UNITTEST_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
target_link_libraries(${JERRYX_MODULE_UNITTEST_NAME} jerry-ext jerry-core jerry-port-default-minimal)
target_include_directories(${JERRYX_MODULE_UNITTEST_NAME} PRIVATE ${INCLUDE_UNIT_EXT})