From 8e1834eeeb8ee21b550acf308ddeba3c867224e4 Mon Sep 17 00:00:00 2001 From: Avimitin Date: Thu, 23 Jan 2025 00:45:38 +0800 Subject: [PATCH] [nix] fix online driver exection Signed-off-by: Avimitin --- nix/t1/run/run-emulator.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nix/t1/run/run-emulator.nix b/nix/t1/run/run-emulator.nix index 32a6772271..ae6f9b82de 100644 --- a/nix/t1/run/run-emulator.nix +++ b/nix/t1/run/run-emulator.nix @@ -33,7 +33,7 @@ stdenvNoCC.mkDerivation (lib.recursiveUpdate dontUnpack = true; emuDriverArgs = assert lib.assertMsg (!(emulator ? enableProfile && emulator.enableProfile)) "The provided emulator has `profile` feature enable, which is inherently nondetermistic, use '.<...attr path...>.profile --impure' instead"; - lib.escapeShellArgs emuDriverArgs; + toString emuDriverArgs; passthru = { # to open 'profileReport.html' in firefox, @@ -68,11 +68,12 @@ stdenvNoCC.mkDerivation (lib.recursiveUpdate exit 1 } - echo "[nix] Running VCS for $caseName with args $emuDriverArgs" + driverPhase="${lib.getExe emulator} $emuDriverArgs" + echo "[nix] Running '$driverPhase'" export RUST_BACKTRACE=full rtlEventOutPath="$out/$caseName-rtl-event.jsonl" - if ! "${lib.getExe emulator}" $emuDriverArgs \ + if ! eval "$driverPhase" \ 1> >(tee $out/online-drive-emu-journal) \ 2>$rtlEventOutPath then