Index: lnt/tests/test_suite.py =================================================================== --- lnt/tests/test_suite.py +++ lnt/tests/test_suite.py @@ -234,6 +234,15 @@ if not isexecfile(split[0]): self._fatal("Run under wrapper not found (looked for %s)" % opts.run_under) + if opts.qemu_user_mode and opts.run_under: + self._fatal("do not specify --run-under when using " + + "--qemu-user-mode") + if opts.qemu_user_mode: + split = shlex.split(opts.qemu_user_mode) + split[0] = resolve_command_path(split[0]) + if not isexecfile(split[0]): + self._fatal("Qemu user mode wrapper not found (looked for %s)" % + opts.qemu_user_mode) if opts.single_result: # --single-result implies --only-test @@ -462,6 +471,10 @@ if self.opts.run_under: defs['TEST_SUITE_RUN_UNDER'] = \ self._unix_quote_args(self.opts.run_under) + if self.opts.qemu_user_mode: + defs['TEST_SUITE_USER_MODE_EMULATION'] = '1' + defs['TEST_SUITE_RUN_UNDER'] = \ + self._unix_quote_args(self.opts.qemu_user_mode) if self.opts.benchmarking_only: defs['TEST_SUITE_BENCHMARKING_ONLY'] = 'ON' if self.opts.only_compile: @@ -1078,6 +1091,9 @@ type=click.UNPROCESSED, default=None) @click.option("--run-under", "run_under", default="", help="Wrapper to run tests under", type=click.UNPROCESSED) +@click.option("--qemu-user-mode", "qemu_user_mode", default="", + help="Enable qemu user mode emulation using this qemu executable", + type=click.UNPROCESSED) @click.option("--exec-multisample", "exec_multisample", help="Accumulate execution test data from multiple runs", type=int, default=1, metavar="N")