Skip to content

Commit

Permalink
Make CamelCase versions of GapExitCode, QuitGap and ForceQuitGap
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Jan 31, 2020
1 parent cf223e5 commit 738b9a5
Show file tree
Hide file tree
Showing 46 changed files with 116 additions and 110 deletions.
4 changes: 2 additions & 2 deletions benchmark/doublecoset/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ res := Test( "doublecoset1.tst", rec(showProgress := true) );
Print( "*** RUNTIME ", Runtime()-starttime, "\n" );

if res then
QUIT_GAP(0);
QuitGap(0);
else
QUIT_GAP(1);
QuitGap(1);
fi;
4 changes: 2 additions & 2 deletions benchmark/doublecoset/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ res := Test( "doublecoset2.tst", rec(showProgress := true) );
Print( "*** RUNTIME ", Runtime()-starttime, "\n" );

if res then
QUIT_GAP(0);
QuitGap(0);
else
QUIT_GAP(1);
QuitGap(1);
fi;
4 changes: 2 additions & 2 deletions benchmark/doublecoset/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ res := Test( "doublecoset3.tst", rec(showProgress := true) );
Print( "*** RUNTIME ", Runtime()-starttime, "\n" );

if res then
QUIT_GAP(0);
QuitGap(0);
else
QUIT_GAP(1);
QuitGap(1);
fi;
4 changes: 2 additions & 2 deletions benchmark/grpauto/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ res := Test( "permiso.tst", rec(showProgress := true) );
Print( "*** RUNTIME ", Runtime()-starttime, "\n" );

if res then
QUIT_GAP(0);
QuitGap(0);
else
QUIT_GAP(1);
QuitGap(1);
fi;
4 changes: 2 additions & 2 deletions benchmark/grpauto/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ res := Test( "hardiso.tst", rec(showProgress := true) );
Print( "*** RUNTIME ", Runtime()-starttime, "\n" );

if res then
QUIT_GAP(0);
QuitGap(0);
else
QUIT_GAP(1);
QuitGap(1);
fi;
4 changes: 2 additions & 2 deletions benchmark/grpauto/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ res := Test( "hardest.tst", rec(showProgress := true) );
Print( "*** RUNTIME ", Runtime()-starttime, "\n" );

if res then
QUIT_GAP(0);
QuitGap(0);
else
QUIT_GAP(1);
QuitGap(1);
fi;
4 changes: 2 additions & 2 deletions benchmark/grpconst/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/grpconst/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/grpconst/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/primgrp/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/primgrp/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/primgrp/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/smallgrp/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/smallgrp/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/smallgrp/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Print("*** RUNTIME ",Runtime()-starttime,"\n");

if has_errors then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
2 changes: 1 addition & 1 deletion benchmark/transclosure/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ for i in [1..6] do
od;

Print("*** RUNTIME ",Runtime()-starttime,"\n");
QUIT_GAP(0);
QuitGap(0);
2 changes: 1 addition & 1 deletion benchmark/transclosure/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ i:=7;
t:=TransitiveClosureBinaryRelation(r);

Print("*** RUNTIME ",Runtime()-starttime,"\n");
QUIT_GAP(0);
QuitGap(0);
2 changes: 1 addition & 1 deletion benchmark/transclosure/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ i:=8;
t:=TransitiveClosureBinaryRelation(r);

Print("*** RUNTIME ",Runtime()-starttime,"\n");
QUIT_GAP(0);
QuitGap(0);
4 changes: 2 additions & 2 deletions benchmark/transgrp/test1.g
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ l:=Length(MakeTransitiveGroups(12));
Print("*** RUNTIME ",Runtime()-starttime,"\n");
if l<>301 then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/transgrp/test2.g
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ l:=Length(MakeTransitiveGroups(16));
Print("*** RUNTIME ",Runtime()-starttime,"\n");
if l<>1954 then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
4 changes: 2 additions & 2 deletions benchmark/transgrp/test3.g
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ l:=Length(MakeTransitiveGroups(20));
Print("*** RUNTIME ",Runtime()-starttime,"\n");
if l<>1117 then
Print("*** FAIL\n");
QUIT_GAP(1);
QuitGap(1);
else
QUIT_GAP(0);
QuitGap(0);
fi;
16 changes: 8 additions & 8 deletions doc/ref/mloop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -986,10 +986,10 @@ or <C>brk></C> or <C>brk_<A>nn</A>></C> prompt.
</ManSection>

<ManSection>
<Func Name="GAP_EXIT_CODE" Arg='ret'/>
<Func Name="GapExitCode" Arg='ret'/>

<Description>
A <C>GAP_EXIT_CODE</C> sets the return value which will be used when
A <C>GapExitCode</C> sets the return value which will be used when
&GAP; exits. This may be an integer, or a boolean (where
<K>true</K> is interpreted as 0, and
<K>false</K> is interpreted as 1.
Expand All @@ -998,24 +998,24 @@ A <C>GAP_EXIT_CODE</C> sets the return value which will be used when
</ManSection>

<ManSection>
<Func Name="QUIT_GAP" Arg='[ret]'/>
<Func Name="QuitGap" Arg='[ret]'/>

<Description>
A <C>QUIT_GAP</C> acts similarly to the keyword <C>quit</C>. It exits
A <C>QuitGap</C> acts similarly to the keyword <C>quit</C>. It exits
&GAP; cleanly, calling any function installed using <C>InstallAtExit</C>.
The optional argument will be passed to <C>GAP_EXIT_CODE</C>.
The optional argument will be passed to <C>GapExitCode</C>.
<P/>
</Description>
</ManSection>

<ManSection>
<Func Name="FORCE_QUIT_GAP" Arg='[ret]'/>
<Func Name="ForceQuitGap" Arg='[ret]'/>

<Description>
A <C>FORCE_QUIT_GAP</C> is similar to <C>QUIT_GAP</C>, except it ignores any
A <C>ForceQuitGap</C> is similar to <C>QuitGap</C>, except it ignores any
functions installed with <C>InstallAtExit</C>, or any other functions
normally run at GAP exit, and exits GAP immediately.
The optional argument will be passed to <C>GAP_EXIT_CODE</C>.
The optional argument will be passed to <C>GapExitCode</C>.
<P/>
</Description>
</ManSection>
Expand Down
2 changes: 1 addition & 1 deletion doc/ref/testconsistency.g
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,6 @@ end;
# Uncomment next line to add ManSections without examples to the test log
# CheckDocCoverage(doc);
QUIT_GAP( CheckManSectionTypes(doc) );
QuitGap( CheckManSectionTypes(doc) );
10 changes: 5 additions & 5 deletions etc/bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ echo '
# if ErrorLevel is not defined, something is very wrong, so skip the commit
if not IsBound(ErrorLevel) then
Print("Panic, ErrorLevel not defined, skipping this commit\\n");
FORCE_QUIT_GAP(125);
ForceQuitGap(125);
fi;
# intercept any further break loops and again, bail out
OnBreak:=function()
Print("Panic, break loop was triggered, skipping this commit\\n");
FORCE_QUIT_GAP(125);
ForceQuitGap(125);
end;
# check if we are in an error handler...
Expand All @@ -119,16 +119,16 @@ if ErrorLevel > 0 then
else
# ... for any other error: tell git to skip this commit
Print("Panic, GAP run into an error during startup, skipping this commit\\n");
FORCE_QUIT_GAP(125);
ForceQuitGap(125);
fi;
fi;
# run the actual test
if Test("'${TESTFILE}'") then
Print("Commit is good\\n");
QUIT_GAP(0);
QuitGap(0);
else
Print("Commit is bad\\n");
QUIT_GAP(1);
QuitGap(1);
fi;
' | bin/gap.sh -A -b -q
2 changes: 1 addition & 1 deletion etc/ci-gather-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ls -l "$COVDIR" # for debugging
$GAP -a 500M -m 500M -q <<GAPInput
if LoadPackage("profiling") <> true then
Print("ERROR: could not load profiling package");
FORCE_QUIT_GAP(1);
ForceQuitGap(1);
fi;
d := Directory("$COVDIR");;
Print("Scanning for coverage data...\n");
Expand Down
2 changes: 1 addition & 1 deletion etc/ci-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ else
fi

# check that GAP is at least able to start
echo 'Print("GAP started successfully\n");QUIT_GAP(0);' | ./gap -T
echo 'Print("GAP started successfully\n");QuitGap(0);' | ./gap -T

# packages must be placed inside SRCDIR, as only that
# is a GAP root, while BUILDDIR is not.
Expand Down
8 changes: 4 additions & 4 deletions etc/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ do
$GAP -b <<GAPInput
SaveWorkspace("testpackagesload.wsp");
PrintTo("packagenames", JoinStringsWithSeparator( SortedList(RecNames( GAPInfo.PackagesInfo )),"\n") );
QUIT_GAP(0);
QuitGap(0);
GAPInput
for pkg in $(cat packagenames)
do
Expand Down Expand Up @@ -141,15 +141,15 @@ GAPInput
SetUserPreference("ReproducibleBehaviour", true);
Read("$SRCDIR/tst/testmanuals.g");
SaveWorkspace("testmanuals.wsp");
QUIT_GAP(0);
QuitGap(0);
GAPInput

TESTMANUALSPASS=yes
for ch in $SRCDIR/tst/testmanuals/*.tst
do
$GAP -b -L testmanuals.wsp --cover $COVDIR/$(basename $ch).coverage <<GAPInput || TESTMANUALSPASS=no
TestManualChapter("$ch");
QUIT_GAP(0);
QuitGap(0);
GAPInput
done

Expand All @@ -162,7 +162,7 @@ GAPInput
# Also test a package banner
LoadPackage("polycyclic");
SaveWorkspace("test.wsp");
QUIT_GAP(0);
QuitGap(0);
GAPInput

;;
Expand Down
4 changes: 2 additions & 2 deletions hpcgap/demo/unittest.g
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ end;
TestReportAndExit := function()
if NumTestErrors = 1 then
Print("*** 1 error occurred.\n");
GAP_EXIT_CODE(1);
GapExitCode(1);
elif NumTestErrors > 1 then
Print("*** ", NumTestErrors, " errors occurred.\n");
GAP_EXIT_CODE(1);
GapExitCode(1);
else
Print("*** No errors occurred.\n");
fi;
Expand Down
4 changes: 2 additions & 2 deletions hpcgap/lib/hpc/consoleui.g
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ end);

BindGlobal("CommandQUIT@", function(line)
TERMINAL_CLOSE();
FORCE_QUIT_GAP();
ForceQuitGap();
end);

BindGlobal("InitializeCommands@", function()
Expand Down Expand Up @@ -1087,7 +1087,7 @@ BindGlobal("MULTI_SESSION", function()
CompleteHandShake(ProgramShutdown@);
PROGRAM_CLEAN_UP();
TERMINAL_CLOSE();
QUIT_GAP();
QuitGap();
end);

BindGlobal("ConsoleUIRegisterCommand", function(name, func)
Expand Down
2 changes: 1 addition & 1 deletion lib/error.g
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ BIND_GLOBAL("ErrorInner", function(options, earlyMessage)
and IsBound(OnBreak) and IsFunction(OnBreak) then
OnBreak();
fi;
FORCE_QUIT_GAP(1);
ForceQuitGap(1);
fi;

# OnBreak() is set to Where() by default, which prints the traceback.
Expand Down
4 changes: 2 additions & 2 deletions lib/init.g
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Error := function( arg )
od;
Print("\n");
if SHOULD_QUIT_ON_BREAK() then
FORCE_QUIT_GAP(1);
ForceQuitGap(1);
fi;
JUMP_TO_CATCH("early error");
end;
Expand All @@ -73,7 +73,7 @@ ErrorInner := function(options, message)
Print("Error before error-handling is initialized: ");
Print(message);
if SHOULD_QUIT_ON_BREAK() then
FORCE_QUIT_GAP(1);
ForceQuitGap(1);
fi;
JUMP_TO_CATCH("early error");
end;
Expand Down
Loading

0 comments on commit 738b9a5

Please sign in to comment.