Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace GAP_ROOT_PATHS in tests with 'GAP_ROOT_PATH' #2898

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/test.gi
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ end);

InstallGlobalFunction(RunTests, function(arg)
local tests, opts, breakOnError, inp, outp, pos, cmp, times, ttime, nrlines,
s, res, fres, t, f, i;
s, res, fres, t, f, i, gaproot;
# don't enter break loop in case of error during test
tests := arg[1];
opts := rec( breakOnError := false, showProgress := "some" );
Expand Down Expand Up @@ -142,6 +142,11 @@ InstallGlobalFunction(RunTests, function(arg)
Error("user interrupt");
BreakOnError := opts.breakOnError;
fi;
# Remove explicit references to GAP's root path, so
# tests can be run on multiple machines
for gaproot in GAPInfo.KernelInfo.GAP_ROOT_PATHS do
res := ReplacedString(res, gaproot, "GAPROOT/");
od;
Add(cmp, res);
Add(times, t);
od;
Expand Down Expand Up @@ -200,6 +205,9 @@ end;
## lines starting with <C>"#"</C>.<Br/>
## All other lines are considered as &GAP; output from the
## preceding &GAP; input.
## To simplify running tests when GAP is installed in different locations,
## any directory in GAPInfo.KernelInfo.GAP_ROOT_PATHS is replaced with the
## string GAPROOT/.
## <P/>
## By default the actual &GAP; output is compared exactly with the
## stored output, and if these are different some information about the
Expand Down
4 changes: 4 additions & 0 deletions tst/testinstall/opers/LocationFunc.tst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ gap> f:=x->x;;
gap> LocationFunc(f);
"stream:1"

# Library function
gap> LocationFunc(OnQuit);
"GAPROOT/lib/error.g:32"

# GAP function which was compiled to C code by gac
gap> LocationFunc(INSTALL_METHOD_FLAGS);
"GAPROOT/lib/oper1.g:146"
Expand Down