about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2023-01-09 17:42:35 -0500
committerAntoni Boucher <bouanto@zoho.com>2023-01-09 17:42:35 -0500
commit4b628e5334fdfab981dc29862d3a806482b493df (patch)
treef84d2153eaf4509a9d8007ecd613976bad27ef16
parentf1f136bb661725dbf283280a793410b7abe2ad73 (diff)
downloadrust-4b628e5334fdfab981dc29862d3a806482b493df.tar.gz
rust-4b628e5334fdfab981dc29862d3a806482b493df.zip
Fix tests
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--tests/lang_tests_common.rs5
2 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1c99e5e2bc2..927eb307761 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -121,7 +121,7 @@ jobs:
       run: |
         ./prepare_build.sh
         ${{ matrix.libgccjit_version.env_extra }} ./build.sh ${{ matrix.libgccjit_version.extra }}
-        cargo test ${{ matrix.libgccjit_version.extra }}
+        ${{ matrix.libgccjit_version.env_extra }} cargo test ${{ matrix.libgccjit_version.extra }}
         ./clean_all.sh
 
     - name: Prepare dependencies
diff --git a/tests/lang_tests_common.rs b/tests/lang_tests_common.rs
index 53d3266776d..06de26f7efc 100644
--- a/tests/lang_tests_common.rs
+++ b/tests/lang_tests_common.rs
@@ -50,6 +50,11 @@ pub fn main_inner(profile: Profile) {
                 "-o", exe.to_str().expect("to_str"),
                 path.to_str().expect("to_str"),
             ]);
+            if let Some(flags) = option_env!("TEST_FLAGS") {
+                for flag in flags.split_whitespace() {
+                    compiler.arg(&flag);
+                }
+            }
             match profile {
                 Profile::Debug => {}
                 Profile::Release => {