]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
tests: remove some github runner PATH tweaking
authorSerge Hallyn <serge@hallyn.com>
Sat, 25 Feb 2023 04:25:58 +0000 (22:25 -0600)
committerSerge Hallyn <serge@hallyn.com>
Tue, 28 Feb 2023 03:38:45 +0000 (21:38 -0600)
It messes with the expected results.

We can do better than this in the expect scripts, but let's
get things running for now.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
tests/common/config.sh

index 664d1056a75f852d14fb1cc1c03713d375f9616c..9b3d37a6fafaa90135f32027bb2c64502b707819 100644 (file)
@@ -21,6 +21,13 @@ save_config ()
                mkdir -p "tmp/$(dirname "$file")"
                [ -f "/$file" ] && cp -dp "/$file" "tmp/$file" || true
        done
+       # remove some things which can mess up PATH for some of our tests
+       # on github runners
+       mkdir -p "tmp/root"
+       cp -dp /root/.bashrc tmp/root/.bashrc
+       cp -dp /root/.profile tmp/root/.profile
+       sed -i '/pipx/d' /root/.bashrc /root/.profile
+       sed -i '/etc\/skel\/.cargo\/env/d' /root/.bashrc /root/.profile
 }
 
 # Copy the config files from config to the system