From 623975d19f19bddb7e1396b56ca3c9f62db82822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Lang=C3=B3?= Date: Mon, 30 Jan 2017 15:44:26 +0100 Subject: [PATCH] Add testing of 'JERRY_CPOINTER_32BIT' option to Travis CI. (#1544) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a new 'buildoptions' option to tools/run-tests.py to add a comma separated list of extra build options to each test. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com --- .travis.yml | 1 + tools/apt-get-install-deps.sh | 2 +- tools/run-tests.py | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd6116fa6..baf27ded0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ env: - OPTS="--jerry-tests --jerry-test-suite" - OPTS="--jerry-tests --jerry-test-suite --toolchain=cmake/toolchain_linux_armv7l.cmake" TIMEOUT=300 INSTALL_QEMU_ARM=yes - OPTS="--buildoption-test" + - OPTS="--jerry-tests --jerry-test-suite --buildoptions=--jerry-libc=off,--compile-flag=-m32,--cpointer-32bit=on" - OPTS="--unittests" - OPTS="--test262" diff --git a/tools/apt-get-install-deps.sh b/tools/apt-get-install-deps.sh index 08737d765..5e9a8ab5b 100755 --- a/tools/apt-get-install-deps.sh +++ b/tools/apt-get-install-deps.sh @@ -17,5 +17,5 @@ sudo apt-get update -q sudo apt-get install -q -y \ make cmake \ - gcc \ + gcc gcc-multilib \ cppcheck vera++ python diff --git a/tools/run-tests.py b/tools/run-tests.py index 5e67aa1b0..6160befec 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -24,6 +24,7 @@ OUTPUT_DIR = path.join(PROJECT_DIR, 'build', 'tests') parser = argparse.ArgumentParser() parser.add_argument('--toolchain', action='store', default='', help='Add toolchain file') +parser.add_argument('--buildoptions', action='store', default='', help='Add a comma separated list of extra build options to each test') parser.add_argument('--outdir', action='store', default=OUTPUT_DIR, help='Specify output directory (default: %(default)s)') parser.add_argument('--check-signed-off', action='store_true', default=False, help='Run signed-off check') parser.add_argument('--check-signed-off-tolerant', action='store_true', default=False, help='Run signed-off check in tolerant mode') @@ -104,6 +105,7 @@ jerry_buildoptions = [ Options('buildoption_test-show_opcodes', ['--show-opcodes=on']), Options('buildoption_test-show_regexp_opcodes', ['--show-regexp-opcodes=on']), Options('buildoption_test-compiler_default_libc', ['--jerry-libc=off']), + Options('buildoption_test-cpointer_32bit', ['--jerry-libc=off', '--compile-flag=-m32', '--cpointer-32bit=on', '--system-allocator=on']), ] def get_bin_dir_path(out_dir): @@ -119,6 +121,9 @@ def create_binary(buildoptions): if script_args.toolchain: build_cmd.append('--toolchain=%s' % script_args.toolchain) + if script_args.buildoptions: + build_cmd.extend(script_args.buildoptions.split(',')) + sys.stderr.write('Build command: %s\n' % ' '.join(build_cmd)) try: