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:
+5
-2
@@ -206,6 +206,9 @@ def create_binary(job, options):
|
||||
build_dir_path = os.path.join(options.outdir, job.name)
|
||||
build_cmd.append('--builddir=%s' % build_dir_path)
|
||||
|
||||
install_dir_path = os.path.join(build_dir_path, 'local')
|
||||
build_cmd.append('--install=%s' % install_dir_path)
|
||||
|
||||
if options.toolchain:
|
||||
build_cmd.append('--toolchain=%s' % options.toolchain)
|
||||
|
||||
@@ -227,7 +230,7 @@ def create_binary(job, options):
|
||||
return ret, build_dir_path
|
||||
|
||||
def get_binary_path(build_dir_path):
|
||||
return os.path.join(build_dir_path, 'bin', 'jerry')
|
||||
return os.path.join(build_dir_path, 'local', 'bin', 'jerry')
|
||||
|
||||
def hash_binary(bin_path):
|
||||
blocksize = 65536
|
||||
@@ -388,7 +391,7 @@ def run_unittests(options):
|
||||
|
||||
ret_test |= run_check([
|
||||
settings.UNITTEST_RUNNER_SCRIPT,
|
||||
os.path.join(build_dir_path, 'bin'),
|
||||
os.path.join(build_dir_path, 'tests'),
|
||||
"-q" if options.quiet else "",
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user