diff --git a/.github/workflows/nix_linux_x86_64.yml b/.github/workflows/nix_linux_x86_64.yml index a392ae0340..e751a4542d 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -20,7 +20,7 @@ jobs: clean: "true" - name: execute tests with --release - run: /home/big-ci-user/.nix-profile/bin/nix develop -c cargo test -j 1 --locked --release -p roc_cli --test cli_run + run: /home/big-ci-user/.nix-profile/bin/nix develop -c cargo test --locked --release - name: upload args binary for inspection if: always() diff --git a/crates/cli/tests/cli_run.rs b/crates/cli/tests/cli_run.rs index 5f9cb2e742..368fd2dd99 100644 --- a/crates/cli/tests/cli_run.rs +++ b/crates/cli/tests/cli_run.rs @@ -290,6 +290,9 @@ mod cli_run { } } + // workaround for surgical linker issue, see PR #3990 + let mut custom_flags : Vec<&str> = vec![]; + match example.executable_filename { "form" | "hello-gui" | "breakout" | "ruby" => { // Since these require things the build system often doesn't have @@ -309,6 +312,9 @@ mod cli_run { eprintln!("WARNING: skipping testing example {} because it only works in a browser!", example.filename); return; } + "args" => { + custom_flags = vec![LINKER_FLAG, "legacy"]; + } _ => {} } @@ -317,12 +323,13 @@ mod cli_run { &file_name, example.stdin, example.executable_filename, - &[LINKER_FLAG, "legacy"], + &custom_flags, &app_args, example.expected_ending, example.use_valgrind, ); + custom_flags.push(OPTIMIZE_FLAG); // This is mostly because the false interpreter is still very slow - // 25s for the cli tests is just not acceptable during development! #[cfg(not(debug_assertions))] @@ -330,7 +337,7 @@ mod cli_run { &file_name, example.stdin, example.executable_filename, - &[LINKER_FLAG, "legacy", OPTIMIZE_FLAG], + &custom_flags, &app_args, example.expected_ending, example.use_valgrind, @@ -338,7 +345,7 @@ mod cli_run { // Also check with the legacy linker. - /*if TEST_LEGACY_LINKER { + if TEST_LEGACY_LINKER { check_output_with_stdin( &file_name, example.stdin, @@ -348,7 +355,7 @@ mod cli_run { example.expected_ending, example.use_valgrind, ); - }*/ + } } )*