diff --git a/GAP_pkg_4ti2interface/test/Project.toml b/GAP_pkg_4ti2interface/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_4ti2interface/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_4ti2interface/test/runtests.jl b/GAP_pkg_4ti2interface/test/runtests.jl index bcc6760..bd3fdc9 100644 --- a/GAP_pkg_4ti2interface/test/runtests.jl +++ b/GAP_pkg_4ti2interface/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_4ti2interface using Test import GAP_pkg_4ti2interface +import GAP_pkg_4ti2interface.GAP + +# verify loading works GAP_pkg_4ti2interface.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("4ti2interface")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_ace/test/Project.toml b/GAP_pkg_ace/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_ace/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_ace/test/runtests.jl b/GAP_pkg_ace/test/runtests.jl index 2b37902..34ce339 100644 --- a/GAP_pkg_ace/test/runtests.jl +++ b/GAP_pkg_ace/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_ace using Test import GAP_pkg_ace +import GAP_pkg_ace.GAP + +# verify loading works GAP_pkg_ace.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("ace")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_aclib/test/Project.toml b/GAP_pkg_aclib/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_aclib/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_aclib/test/runtests.jl b/GAP_pkg_aclib/test/runtests.jl index 0fbd80c..d1804ad 100644 --- a/GAP_pkg_aclib/test/runtests.jl +++ b/GAP_pkg_aclib/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_aclib using Test import GAP_pkg_aclib +import GAP_pkg_aclib.GAP + +# verify loading works GAP_pkg_aclib.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("aclib")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_agt/test/Project.toml b/GAP_pkg_agt/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_agt/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_agt/test/runtests.jl b/GAP_pkg_agt/test/runtests.jl index 9bb9fbf..41e891b 100644 --- a/GAP_pkg_agt/test/runtests.jl +++ b/GAP_pkg_agt/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_agt using Test import GAP_pkg_agt +import GAP_pkg_agt.GAP + +# verify loading works GAP_pkg_agt.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("agt")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_alnuth/test/Project.toml b/GAP_pkg_alnuth/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_alnuth/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_alnuth/test/runtests.jl b/GAP_pkg_alnuth/test/runtests.jl index 4154849..20a07e7 100644 --- a/GAP_pkg_alnuth/test/runtests.jl +++ b/GAP_pkg_alnuth/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_alnuth using Test import GAP_pkg_alnuth +import GAP_pkg_alnuth.GAP + +# verify loading works GAP_pkg_alnuth.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("alnuth")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_anupq/test/Project.toml b/GAP_pkg_anupq/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_anupq/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_anupq/test/runtests.jl b/GAP_pkg_anupq/test/runtests.jl index 6233aa0..fdf8a1f 100644 --- a/GAP_pkg_anupq/test/runtests.jl +++ b/GAP_pkg_anupq/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_anupq using Test import GAP_pkg_anupq +import GAP_pkg_anupq.GAP + +# verify loading works GAP_pkg_anupq.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("anupq")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_atlasrep/test/Project.toml b/GAP_pkg_atlasrep/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_atlasrep/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_atlasrep/test/runtests.jl b/GAP_pkg_atlasrep/test/runtests.jl index ddf39ef..ef71692 100644 --- a/GAP_pkg_atlasrep/test/runtests.jl +++ b/GAP_pkg_atlasrep/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_atlasrep using Test import GAP_pkg_atlasrep +import GAP_pkg_atlasrep.GAP + +# verify loading works GAP_pkg_atlasrep.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("atlasrep")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_autodoc/test/Project.toml b/GAP_pkg_autodoc/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_autodoc/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_autodoc/test/runtests.jl b/GAP_pkg_autodoc/test/runtests.jl index 02353d6..d461753 100644 --- a/GAP_pkg_autodoc/test/runtests.jl +++ b/GAP_pkg_autodoc/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_autodoc using Test import GAP_pkg_autodoc +import GAP_pkg_autodoc.GAP + +# verify loading works GAP_pkg_autodoc.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("autodoc")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_automata/test/Project.toml b/GAP_pkg_automata/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_automata/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_automata/test/runtests.jl b/GAP_pkg_automata/test/runtests.jl index dd95c96..cf1b9a4 100644 --- a/GAP_pkg_automata/test/runtests.jl +++ b/GAP_pkg_automata/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_automata using Test import GAP_pkg_automata +import GAP_pkg_automata.GAP + +# verify loading works GAP_pkg_automata.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("automata")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_automgrp/test/Project.toml b/GAP_pkg_automgrp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_automgrp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_automgrp/test/runtests.jl b/GAP_pkg_automgrp/test/runtests.jl index 4c27c73..95b70ea 100644 --- a/GAP_pkg_automgrp/test/runtests.jl +++ b/GAP_pkg_automgrp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_automgrp using Test import GAP_pkg_automgrp +import GAP_pkg_automgrp.GAP + +# verify loading works GAP_pkg_automgrp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("automgrp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_autpgrp/test/Project.toml b/GAP_pkg_autpgrp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_autpgrp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_autpgrp/test/runtests.jl b/GAP_pkg_autpgrp/test/runtests.jl index 38eeda9..3911e19 100644 --- a/GAP_pkg_autpgrp/test/runtests.jl +++ b/GAP_pkg_autpgrp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_autpgrp using Test import GAP_pkg_autpgrp +import GAP_pkg_autpgrp.GAP + +# verify loading works GAP_pkg_autpgrp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("autpgrp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_browse/test/Project.toml b/GAP_pkg_browse/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_browse/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_browse/test/runtests.jl b/GAP_pkg_browse/test/runtests.jl index 22d13c0..d3e532f 100644 --- a/GAP_pkg_browse/test/runtests.jl +++ b/GAP_pkg_browse/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_browse using Test import GAP_pkg_browse +import GAP_pkg_browse.GAP + +# verify loading works GAP_pkg_browse.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("browse")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_cap/test/Project.toml b/GAP_pkg_cap/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_cap/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_cap/test/runtests.jl b/GAP_pkg_cap/test/runtests.jl index 1083b47..8e06917 100644 --- a/GAP_pkg_cap/test/runtests.jl +++ b/GAP_pkg_cap/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_cap using Test import GAP_pkg_cap +import GAP_pkg_cap.GAP + +# verify loading works GAP_pkg_cap.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("cap")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_caratinterface/test/Project.toml b/GAP_pkg_caratinterface/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_caratinterface/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_caratinterface/test/runtests.jl b/GAP_pkg_caratinterface/test/runtests.jl index 5f4f355..9fc40b1 100644 --- a/GAP_pkg_caratinterface/test/runtests.jl +++ b/GAP_pkg_caratinterface/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_caratinterface using Test import GAP_pkg_caratinterface +import GAP_pkg_caratinterface.GAP + +# verify loading works GAP_pkg_caratinterface.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("caratinterface")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_cddinterface/test/Project.toml b/GAP_pkg_cddinterface/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_cddinterface/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_cddinterface/test/runtests.jl b/GAP_pkg_cddinterface/test/runtests.jl index 3463c2b..95dd6cb 100644 --- a/GAP_pkg_cddinterface/test/runtests.jl +++ b/GAP_pkg_cddinterface/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_cddinterface using Test import GAP_pkg_cddinterface +import GAP_pkg_cddinterface.GAP + +# verify loading works GAP_pkg_cddinterface.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("cddinterface")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_circle/test/Project.toml b/GAP_pkg_circle/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_circle/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_circle/test/runtests.jl b/GAP_pkg_circle/test/runtests.jl index 86bb94d..1a02a93 100644 --- a/GAP_pkg_circle/test/runtests.jl +++ b/GAP_pkg_circle/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_circle using Test import GAP_pkg_circle +import GAP_pkg_circle.GAP + +# verify loading works GAP_pkg_circle.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("circle")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_classicpres/test/Project.toml b/GAP_pkg_classicpres/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_classicpres/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_classicpres/test/runtests.jl b/GAP_pkg_classicpres/test/runtests.jl index 75c496e..461a76f 100644 --- a/GAP_pkg_classicpres/test/runtests.jl +++ b/GAP_pkg_classicpres/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_classicpres using Test import GAP_pkg_classicpres +import GAP_pkg_classicpres.GAP + +# verify loading works GAP_pkg_classicpres.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("classicpres")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_cohomolo/test/Project.toml b/GAP_pkg_cohomolo/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_cohomolo/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_cohomolo/test/runtests.jl b/GAP_pkg_cohomolo/test/runtests.jl index d6b6741..1b98dc4 100644 --- a/GAP_pkg_cohomolo/test/runtests.jl +++ b/GAP_pkg_cohomolo/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_cohomolo using Test import GAP_pkg_cohomolo +import GAP_pkg_cohomolo.GAP + +# verify loading works GAP_pkg_cohomolo.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("cohomolo")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_congruence/test/Project.toml b/GAP_pkg_congruence/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_congruence/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_congruence/test/runtests.jl b/GAP_pkg_congruence/test/runtests.jl index 5df0e9e..3fb13a5 100644 --- a/GAP_pkg_congruence/test/runtests.jl +++ b/GAP_pkg_congruence/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_congruence using Test import GAP_pkg_congruence +import GAP_pkg_congruence.GAP + +# verify loading works GAP_pkg_congruence.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("congruence")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_corelg/test/Project.toml b/GAP_pkg_corelg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_corelg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_corelg/test/runtests.jl b/GAP_pkg_corelg/test/runtests.jl index 498d3ce..02620b5 100644 --- a/GAP_pkg_corelg/test/runtests.jl +++ b/GAP_pkg_corelg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_corelg using Test import GAP_pkg_corelg +import GAP_pkg_corelg.GAP + +# verify loading works GAP_pkg_corelg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("corelg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_crime/test/Project.toml b/GAP_pkg_crime/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_crime/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_crime/test/runtests.jl b/GAP_pkg_crime/test/runtests.jl index 47958d9..29ff56d 100644 --- a/GAP_pkg_crime/test/runtests.jl +++ b/GAP_pkg_crime/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_crime using Test import GAP_pkg_crime +import GAP_pkg_crime.GAP + +# verify loading works GAP_pkg_crime.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("crime")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_crisp/test/Project.toml b/GAP_pkg_crisp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_crisp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_crisp/test/runtests.jl b/GAP_pkg_crisp/test/runtests.jl index d6c6c46..876bf88 100644 --- a/GAP_pkg_crisp/test/runtests.jl +++ b/GAP_pkg_crisp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_crisp using Test import GAP_pkg_crisp +import GAP_pkg_crisp.GAP + +# verify loading works GAP_pkg_crisp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("crisp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_crypting/test/Project.toml b/GAP_pkg_crypting/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_crypting/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_crypting/test/runtests.jl b/GAP_pkg_crypting/test/runtests.jl index 69b15b2..e4b5cdb 100644 --- a/GAP_pkg_crypting/test/runtests.jl +++ b/GAP_pkg_crypting/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_crypting using Test import GAP_pkg_crypting +import GAP_pkg_crypting.GAP + +# verify loading works GAP_pkg_crypting.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("crypting")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_cryst/test/Project.toml b/GAP_pkg_cryst/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_cryst/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_cryst/test/runtests.jl b/GAP_pkg_cryst/test/runtests.jl index c62ca7b..5c7c260 100644 --- a/GAP_pkg_cryst/test/runtests.jl +++ b/GAP_pkg_cryst/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_cryst using Test import GAP_pkg_cryst +import GAP_pkg_cryst.GAP + +# verify loading works GAP_pkg_cryst.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("cryst")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_crystcat/test/Project.toml b/GAP_pkg_crystcat/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_crystcat/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_crystcat/test/runtests.jl b/GAP_pkg_crystcat/test/runtests.jl index 8576f73..9f8a0ae 100644 --- a/GAP_pkg_crystcat/test/runtests.jl +++ b/GAP_pkg_crystcat/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_crystcat using Test import GAP_pkg_crystcat +import GAP_pkg_crystcat.GAP + +# verify loading works GAP_pkg_crystcat.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("crystcat")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_ctbllib/test/Project.toml b/GAP_pkg_ctbllib/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_ctbllib/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_ctbllib/test/runtests.jl b/GAP_pkg_ctbllib/test/runtests.jl index e22db35..7f1fc7b 100644 --- a/GAP_pkg_ctbllib/test/runtests.jl +++ b/GAP_pkg_ctbllib/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_ctbllib using Test import GAP_pkg_ctbllib +import GAP_pkg_ctbllib.GAP + +# verify loading works GAP_pkg_ctbllib.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("ctbllib")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_cubefree/test/Project.toml b/GAP_pkg_cubefree/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_cubefree/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_cubefree/test/runtests.jl b/GAP_pkg_cubefree/test/runtests.jl index 2591a8b..c45d1d8 100644 --- a/GAP_pkg_cubefree/test/runtests.jl +++ b/GAP_pkg_cubefree/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_cubefree using Test import GAP_pkg_cubefree +import GAP_pkg_cubefree.GAP + +# verify loading works GAP_pkg_cubefree.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("cubefree")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_curlinterface/test/Project.toml b/GAP_pkg_curlinterface/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_curlinterface/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_curlinterface/test/runtests.jl b/GAP_pkg_curlinterface/test/runtests.jl index 76947f2..a960735 100644 --- a/GAP_pkg_curlinterface/test/runtests.jl +++ b/GAP_pkg_curlinterface/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_curlinterface using Test import GAP_pkg_curlinterface +import GAP_pkg_curlinterface.GAP + +# verify loading works GAP_pkg_curlinterface.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("curlinterface")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_cvec/test/Project.toml b/GAP_pkg_cvec/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_cvec/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_cvec/test/runtests.jl b/GAP_pkg_cvec/test/runtests.jl index 4609315..75b4db1 100644 --- a/GAP_pkg_cvec/test/runtests.jl +++ b/GAP_pkg_cvec/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_cvec using Test import GAP_pkg_cvec +import GAP_pkg_cvec.GAP + +# verify loading works GAP_pkg_cvec.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("cvec")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_datastructures/test/Project.toml b/GAP_pkg_datastructures/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_datastructures/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_datastructures/test/runtests.jl b/GAP_pkg_datastructures/test/runtests.jl index 2e5b116..f01ad9c 100644 --- a/GAP_pkg_datastructures/test/runtests.jl +++ b/GAP_pkg_datastructures/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_datastructures using Test import GAP_pkg_datastructures +import GAP_pkg_datastructures.GAP + +# verify loading works GAP_pkg_datastructures.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("datastructures")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_deepthought/test/Project.toml b/GAP_pkg_deepthought/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_deepthought/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_deepthought/test/runtests.jl b/GAP_pkg_deepthought/test/runtests.jl index f7ec1fe..1ed9106 100644 --- a/GAP_pkg_deepthought/test/runtests.jl +++ b/GAP_pkg_deepthought/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_deepthought using Test import GAP_pkg_deepthought +import GAP_pkg_deepthought.GAP + +# verify loading works GAP_pkg_deepthought.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("deepthought")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_design/test/Project.toml b/GAP_pkg_design/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_design/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_design/test/runtests.jl b/GAP_pkg_design/test/runtests.jl index 4637acd..da26cf6 100644 --- a/GAP_pkg_design/test/runtests.jl +++ b/GAP_pkg_design/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_design using Test import GAP_pkg_design +import GAP_pkg_design.GAP + +# verify loading works GAP_pkg_design.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("design")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_difsets/test/Project.toml b/GAP_pkg_difsets/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_difsets/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_difsets/test/runtests.jl b/GAP_pkg_difsets/test/runtests.jl index 09bb57d..fe75e0f 100644 --- a/GAP_pkg_difsets/test/runtests.jl +++ b/GAP_pkg_difsets/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_difsets using Test import GAP_pkg_difsets +import GAP_pkg_difsets.GAP + +# verify loading works GAP_pkg_difsets.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("difsets")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_digraphs/test/Project.toml b/GAP_pkg_digraphs/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_digraphs/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_digraphs/test/runtests.jl b/GAP_pkg_digraphs/test/runtests.jl index 980884d..b92d00b 100644 --- a/GAP_pkg_digraphs/test/runtests.jl +++ b/GAP_pkg_digraphs/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_digraphs using Test import GAP_pkg_digraphs +import GAP_pkg_digraphs.GAP + +# verify loading works GAP_pkg_digraphs.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("digraphs")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_edim/test/Project.toml b/GAP_pkg_edim/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_edim/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_edim/test/runtests.jl b/GAP_pkg_edim/test/runtests.jl index afbe63a..548f1ed 100644 --- a/GAP_pkg_edim/test/runtests.jl +++ b/GAP_pkg_edim/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_edim using Test import GAP_pkg_edim +import GAP_pkg_edim.GAP + +# verify loading works GAP_pkg_edim.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("edim")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_example/test/Project.toml b/GAP_pkg_example/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_example/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_example/test/runtests.jl b/GAP_pkg_example/test/runtests.jl index a18b1d9..9388675 100644 --- a/GAP_pkg_example/test/runtests.jl +++ b/GAP_pkg_example/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_example using Test import GAP_pkg_example +import GAP_pkg_example.GAP + +# verify loading works GAP_pkg_example.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("example")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_examplesforhomalg/test/Project.toml b/GAP_pkg_examplesforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_examplesforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_examplesforhomalg/test/runtests.jl b/GAP_pkg_examplesforhomalg/test/runtests.jl index c5f050c..acc6e7c 100644 --- a/GAP_pkg_examplesforhomalg/test/runtests.jl +++ b/GAP_pkg_examplesforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_examplesforhomalg using Test import GAP_pkg_examplesforhomalg +import GAP_pkg_examplesforhomalg.GAP + +# verify loading works GAP_pkg_examplesforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("examplesforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_factint/test/Project.toml b/GAP_pkg_factint/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_factint/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_factint/test/runtests.jl b/GAP_pkg_factint/test/runtests.jl index 08d02a7..7fac5e3 100644 --- a/GAP_pkg_factint/test/runtests.jl +++ b/GAP_pkg_factint/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_factint using Test import GAP_pkg_factint +import GAP_pkg_factint.GAP + +# verify loading works GAP_pkg_factint.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("factint")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_ferret/test/Project.toml b/GAP_pkg_ferret/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_ferret/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_ferret/test/runtests.jl b/GAP_pkg_ferret/test/runtests.jl index 8b48e9e..4e6ba3c 100644 --- a/GAP_pkg_ferret/test/runtests.jl +++ b/GAP_pkg_ferret/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_ferret using Test import GAP_pkg_ferret +import GAP_pkg_ferret.GAP + +# verify loading works GAP_pkg_ferret.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("ferret")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_fga/test/Project.toml b/GAP_pkg_fga/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_fga/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_fga/test/runtests.jl b/GAP_pkg_fga/test/runtests.jl index 820fe44..1367c4d 100644 --- a/GAP_pkg_fga/test/runtests.jl +++ b/GAP_pkg_fga/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_fga using Test import GAP_pkg_fga +import GAP_pkg_fga.GAP + +# verify loading works GAP_pkg_fga.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("fga")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_fining/test/Project.toml b/GAP_pkg_fining/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_fining/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_fining/test/runtests.jl b/GAP_pkg_fining/test/runtests.jl index ec1a8ed..519e99f 100644 --- a/GAP_pkg_fining/test/runtests.jl +++ b/GAP_pkg_fining/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_fining using Test import GAP_pkg_fining +import GAP_pkg_fining.GAP + +# verify loading works GAP_pkg_fining.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("fining")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_float/test/Project.toml b/GAP_pkg_float/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_float/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_float/test/runtests.jl b/GAP_pkg_float/test/runtests.jl index ef8966f..d95e83d 100644 --- a/GAP_pkg_float/test/runtests.jl +++ b/GAP_pkg_float/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_float using Test import GAP_pkg_float +import GAP_pkg_float.GAP + +# verify loading works GAP_pkg_float.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("float")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_format/test/Project.toml b/GAP_pkg_format/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_format/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_format/test/runtests.jl b/GAP_pkg_format/test/runtests.jl index ea1bb16..5da3293 100644 --- a/GAP_pkg_format/test/runtests.jl +++ b/GAP_pkg_format/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_format using Test import GAP_pkg_format +import GAP_pkg_format.GAP + +# verify loading works GAP_pkg_format.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("format")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_forms/test/Project.toml b/GAP_pkg_forms/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_forms/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_forms/test/runtests.jl b/GAP_pkg_forms/test/runtests.jl index da70f0c..f02af6e 100644 --- a/GAP_pkg_forms/test/runtests.jl +++ b/GAP_pkg_forms/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_forms using Test import GAP_pkg_forms +import GAP_pkg_forms.GAP + +# verify loading works GAP_pkg_forms.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("forms")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_fplsa/test/Project.toml b/GAP_pkg_fplsa/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_fplsa/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_fplsa/test/runtests.jl b/GAP_pkg_fplsa/test/runtests.jl index 3bdf6ee..8164deb 100644 --- a/GAP_pkg_fplsa/test/runtests.jl +++ b/GAP_pkg_fplsa/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_fplsa using Test import GAP_pkg_fplsa +import GAP_pkg_fplsa.GAP + +# verify loading works GAP_pkg_fplsa.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("fplsa")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_fr/test/Project.toml b/GAP_pkg_fr/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_fr/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_fr/test/runtests.jl b/GAP_pkg_fr/test/runtests.jl index c011e51..240fb99 100644 --- a/GAP_pkg_fr/test/runtests.jl +++ b/GAP_pkg_fr/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_fr using Test import GAP_pkg_fr +import GAP_pkg_fr.GAP + +# verify loading works GAP_pkg_fr.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("fr")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_francy/test/Project.toml b/GAP_pkg_francy/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_francy/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_francy/test/runtests.jl b/GAP_pkg_francy/test/runtests.jl index e1ccca8..47e55e0 100644 --- a/GAP_pkg_francy/test/runtests.jl +++ b/GAP_pkg_francy/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_francy using Test import GAP_pkg_francy +import GAP_pkg_francy.GAP + +# verify loading works GAP_pkg_francy.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("francy")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_fwtree/test/Project.toml b/GAP_pkg_fwtree/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_fwtree/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_fwtree/test/runtests.jl b/GAP_pkg_fwtree/test/runtests.jl index 8d0457d..b9071c1 100644 --- a/GAP_pkg_fwtree/test/runtests.jl +++ b/GAP_pkg_fwtree/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_fwtree using Test import GAP_pkg_fwtree +import GAP_pkg_fwtree.GAP + +# verify loading works GAP_pkg_fwtree.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("fwtree")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_gapdoc/test/Project.toml b/GAP_pkg_gapdoc/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_gapdoc/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_gapdoc/test/runtests.jl b/GAP_pkg_gapdoc/test/runtests.jl index b10227e..1e4833c 100644 --- a/GAP_pkg_gapdoc/test/runtests.jl +++ b/GAP_pkg_gapdoc/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_gapdoc using Test import GAP_pkg_gapdoc +import GAP_pkg_gapdoc.GAP + +# verify loading works GAP_pkg_gapdoc.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("gapdoc")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_gauss/test/Project.toml b/GAP_pkg_gauss/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_gauss/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_gauss/test/runtests.jl b/GAP_pkg_gauss/test/runtests.jl index 8bb270b..70299d4 100644 --- a/GAP_pkg_gauss/test/runtests.jl +++ b/GAP_pkg_gauss/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_gauss using Test import GAP_pkg_gauss +import GAP_pkg_gauss.GAP + +# verify loading works GAP_pkg_gauss.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("gauss")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_gaussforhomalg/test/Project.toml b/GAP_pkg_gaussforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_gaussforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_gaussforhomalg/test/runtests.jl b/GAP_pkg_gaussforhomalg/test/runtests.jl index 1c6ae84..57251ba 100644 --- a/GAP_pkg_gaussforhomalg/test/runtests.jl +++ b/GAP_pkg_gaussforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_gaussforhomalg using Test import GAP_pkg_gaussforhomalg +import GAP_pkg_gaussforhomalg.GAP + +# verify loading works GAP_pkg_gaussforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("gaussforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_gbnp/test/Project.toml b/GAP_pkg_gbnp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_gbnp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_gbnp/test/runtests.jl b/GAP_pkg_gbnp/test/runtests.jl index 374c884..1587040 100644 --- a/GAP_pkg_gbnp/test/runtests.jl +++ b/GAP_pkg_gbnp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_gbnp using Test import GAP_pkg_gbnp +import GAP_pkg_gbnp.GAP + +# verify loading works GAP_pkg_gbnp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("gbnp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_generalizedmorphismsforcap/test/Project.toml b/GAP_pkg_generalizedmorphismsforcap/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_generalizedmorphismsforcap/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_generalizedmorphismsforcap/test/runtests.jl b/GAP_pkg_generalizedmorphismsforcap/test/runtests.jl index 7e5ef63..76062bb 100644 --- a/GAP_pkg_generalizedmorphismsforcap/test/runtests.jl +++ b/GAP_pkg_generalizedmorphismsforcap/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_generalizedmorphismsforcap using Test import GAP_pkg_generalizedmorphismsforcap +import GAP_pkg_generalizedmorphismsforcap.GAP + +# verify loading works GAP_pkg_generalizedmorphismsforcap.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("generalizedmorphismsforcap")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_genss/test/Project.toml b/GAP_pkg_genss/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_genss/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_genss/test/runtests.jl b/GAP_pkg_genss/test/runtests.jl index f61436f..3f9ff83 100644 --- a/GAP_pkg_genss/test/runtests.jl +++ b/GAP_pkg_genss/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_genss using Test import GAP_pkg_genss +import GAP_pkg_genss.GAP + +# verify loading works GAP_pkg_genss.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("genss")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_gradedmodules/test/Project.toml b/GAP_pkg_gradedmodules/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_gradedmodules/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_gradedmodules/test/runtests.jl b/GAP_pkg_gradedmodules/test/runtests.jl index 5d82b07..9ac4a1d 100644 --- a/GAP_pkg_gradedmodules/test/runtests.jl +++ b/GAP_pkg_gradedmodules/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_gradedmodules using Test import GAP_pkg_gradedmodules +import GAP_pkg_gradedmodules.GAP + +# verify loading works GAP_pkg_gradedmodules.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("gradedmodules")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_gradedringforhomalg/test/Project.toml b/GAP_pkg_gradedringforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_gradedringforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_gradedringforhomalg/test/runtests.jl b/GAP_pkg_gradedringforhomalg/test/runtests.jl index 790d159..f76078b 100644 --- a/GAP_pkg_gradedringforhomalg/test/runtests.jl +++ b/GAP_pkg_gradedringforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_gradedringforhomalg using Test import GAP_pkg_gradedringforhomalg +import GAP_pkg_gradedringforhomalg.GAP + +# verify loading works GAP_pkg_gradedringforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("gradedringforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_grape/test/Project.toml b/GAP_pkg_grape/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_grape/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_grape/test/runtests.jl b/GAP_pkg_grape/test/runtests.jl index 5afa3b3..64eb6e6 100644 --- a/GAP_pkg_grape/test/runtests.jl +++ b/GAP_pkg_grape/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_grape using Test import GAP_pkg_grape +import GAP_pkg_grape.GAP + +# verify loading works GAP_pkg_grape.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("grape")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_groupoids/test/Project.toml b/GAP_pkg_groupoids/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_groupoids/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_groupoids/test/runtests.jl b/GAP_pkg_groupoids/test/runtests.jl index d8e9ea6..f6a6e72 100644 --- a/GAP_pkg_groupoids/test/runtests.jl +++ b/GAP_pkg_groupoids/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_groupoids using Test import GAP_pkg_groupoids +import GAP_pkg_groupoids.GAP + +# verify loading works GAP_pkg_groupoids.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("groupoids")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_grpconst/test/Project.toml b/GAP_pkg_grpconst/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_grpconst/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_grpconst/test/runtests.jl b/GAP_pkg_grpconst/test/runtests.jl index 7808220..83b491a 100644 --- a/GAP_pkg_grpconst/test/runtests.jl +++ b/GAP_pkg_grpconst/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_grpconst using Test import GAP_pkg_grpconst +import GAP_pkg_grpconst.GAP + +# verify loading works GAP_pkg_grpconst.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("grpconst")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_guarana/test/Project.toml b/GAP_pkg_guarana/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_guarana/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_guarana/test/runtests.jl b/GAP_pkg_guarana/test/runtests.jl index ad99b7a..1f56a54 100644 --- a/GAP_pkg_guarana/test/runtests.jl +++ b/GAP_pkg_guarana/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_guarana using Test import GAP_pkg_guarana +import GAP_pkg_guarana.GAP + +# verify loading works GAP_pkg_guarana.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("guarana")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_guava/test/Project.toml b/GAP_pkg_guava/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_guava/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_guava/test/runtests.jl b/GAP_pkg_guava/test/runtests.jl index 6a5c615..2314aae 100644 --- a/GAP_pkg_guava/test/runtests.jl +++ b/GAP_pkg_guava/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_guava using Test import GAP_pkg_guava +import GAP_pkg_guava.GAP + +# verify loading works GAP_pkg_guava.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("guava")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_hap/test/Project.toml b/GAP_pkg_hap/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_hap/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_hap/test/runtests.jl b/GAP_pkg_hap/test/runtests.jl index 82e8c59..1321756 100644 --- a/GAP_pkg_hap/test/runtests.jl +++ b/GAP_pkg_hap/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_hap using Test import GAP_pkg_hap +import GAP_pkg_hap.GAP + +# verify loading works GAP_pkg_hap.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("hap")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_hapcryst/test/Project.toml b/GAP_pkg_hapcryst/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_hapcryst/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_hapcryst/test/runtests.jl b/GAP_pkg_hapcryst/test/runtests.jl index 732789f..26f515e 100644 --- a/GAP_pkg_hapcryst/test/runtests.jl +++ b/GAP_pkg_hapcryst/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_hapcryst using Test import GAP_pkg_hapcryst +import GAP_pkg_hapcryst.GAP + +# verify loading works GAP_pkg_hapcryst.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("hapcryst")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_hecke/test/Project.toml b/GAP_pkg_hecke/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_hecke/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_hecke/test/runtests.jl b/GAP_pkg_hecke/test/runtests.jl index f99d959..e8750db 100644 --- a/GAP_pkg_hecke/test/runtests.jl +++ b/GAP_pkg_hecke/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_hecke using Test import GAP_pkg_hecke +import GAP_pkg_hecke.GAP + +# verify loading works GAP_pkg_hecke.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("hecke")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_help/test/Project.toml b/GAP_pkg_help/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_help/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_help/test/runtests.jl b/GAP_pkg_help/test/runtests.jl index f80fff7..7a4de61 100644 --- a/GAP_pkg_help/test/runtests.jl +++ b/GAP_pkg_help/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_help using Test import GAP_pkg_help +import GAP_pkg_help.GAP + +# verify loading works GAP_pkg_help.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("help")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_homalg/test/Project.toml b/GAP_pkg_homalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_homalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_homalg/test/runtests.jl b/GAP_pkg_homalg/test/runtests.jl index 3419e98..4871ac8 100644 --- a/GAP_pkg_homalg/test/runtests.jl +++ b/GAP_pkg_homalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_homalg using Test import GAP_pkg_homalg +import GAP_pkg_homalg.GAP + +# verify loading works GAP_pkg_homalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("homalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_homalgtocas/test/Project.toml b/GAP_pkg_homalgtocas/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_homalgtocas/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_homalgtocas/test/runtests.jl b/GAP_pkg_homalgtocas/test/runtests.jl index a4fda30..7dc80d6 100644 --- a/GAP_pkg_homalgtocas/test/runtests.jl +++ b/GAP_pkg_homalgtocas/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_homalgtocas using Test import GAP_pkg_homalgtocas +import GAP_pkg_homalgtocas.GAP + +# verify loading works GAP_pkg_homalgtocas.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("homalgtocas")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_idrel/test/Project.toml b/GAP_pkg_idrel/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_idrel/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_idrel/test/runtests.jl b/GAP_pkg_idrel/test/runtests.jl index dadc2b8..9450584 100644 --- a/GAP_pkg_idrel/test/runtests.jl +++ b/GAP_pkg_idrel/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_idrel using Test import GAP_pkg_idrel +import GAP_pkg_idrel.GAP + +# verify loading works GAP_pkg_idrel.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("idrel")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_images/test/Project.toml b/GAP_pkg_images/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_images/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_images/test/runtests.jl b/GAP_pkg_images/test/runtests.jl index b43a261..df0f516 100644 --- a/GAP_pkg_images/test/runtests.jl +++ b/GAP_pkg_images/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_images using Test import GAP_pkg_images +import GAP_pkg_images.GAP + +# verify loading works GAP_pkg_images.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("images")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_intpic/test/Project.toml b/GAP_pkg_intpic/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_intpic/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_intpic/test/runtests.jl b/GAP_pkg_intpic/test/runtests.jl index f7367ba..aac1293 100644 --- a/GAP_pkg_intpic/test/runtests.jl +++ b/GAP_pkg_intpic/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_intpic using Test import GAP_pkg_intpic +import GAP_pkg_intpic.GAP + +# verify loading works GAP_pkg_intpic.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("intpic")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_io/test/Project.toml b/GAP_pkg_io/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_io/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_io/test/runtests.jl b/GAP_pkg_io/test/runtests.jl index db0bfbb..3f1bde7 100644 --- a/GAP_pkg_io/test/runtests.jl +++ b/GAP_pkg_io/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_io using Test import GAP_pkg_io +import GAP_pkg_io.GAP + +# verify loading works GAP_pkg_io.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("io")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_io_forhomalg/test/Project.toml b/GAP_pkg_io_forhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_io_forhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_io_forhomalg/test/runtests.jl b/GAP_pkg_io_forhomalg/test/runtests.jl index 851b43d..714eeac 100644 --- a/GAP_pkg_io_forhomalg/test/runtests.jl +++ b/GAP_pkg_io_forhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_io_forhomalg using Test import GAP_pkg_io_forhomalg +import GAP_pkg_io_forhomalg.GAP + +# verify loading works GAP_pkg_io_forhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("io_forhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_irredsol/test/Project.toml b/GAP_pkg_irredsol/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_irredsol/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_irredsol/test/runtests.jl b/GAP_pkg_irredsol/test/runtests.jl index aa80634..c28cea2 100644 --- a/GAP_pkg_irredsol/test/runtests.jl +++ b/GAP_pkg_irredsol/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_irredsol using Test import GAP_pkg_irredsol +import GAP_pkg_irredsol.GAP + +# verify loading works GAP_pkg_irredsol.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("irredsol")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_itc/test/Project.toml b/GAP_pkg_itc/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_itc/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_itc/test/runtests.jl b/GAP_pkg_itc/test/runtests.jl index 1a2e538..f5ad0b0 100644 --- a/GAP_pkg_itc/test/runtests.jl +++ b/GAP_pkg_itc/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_itc using Test import GAP_pkg_itc +import GAP_pkg_itc.GAP + +# verify loading works GAP_pkg_itc.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("itc")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_json/test/Project.toml b/GAP_pkg_json/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_json/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_json/test/runtests.jl b/GAP_pkg_json/test/runtests.jl index 82fb363..8220175 100644 --- a/GAP_pkg_json/test/runtests.jl +++ b/GAP_pkg_json/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_json using Test import GAP_pkg_json +import GAP_pkg_json.GAP + +# verify loading works GAP_pkg_json.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("json")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_jupyterkernel/test/Project.toml b/GAP_pkg_jupyterkernel/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_jupyterkernel/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_jupyterkernel/test/runtests.jl b/GAP_pkg_jupyterkernel/test/runtests.jl index bfd3590..299ee13 100644 --- a/GAP_pkg_jupyterkernel/test/runtests.jl +++ b/GAP_pkg_jupyterkernel/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_jupyterkernel using Test import GAP_pkg_jupyterkernel +import GAP_pkg_jupyterkernel.GAP + +# verify loading works GAP_pkg_jupyterkernel.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("jupyterkernel")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_jupyterviz/test/Project.toml b/GAP_pkg_jupyterviz/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_jupyterviz/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_jupyterviz/test/runtests.jl b/GAP_pkg_jupyterviz/test/runtests.jl index 3b36277..b1437df 100644 --- a/GAP_pkg_jupyterviz/test/runtests.jl +++ b/GAP_pkg_jupyterviz/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_jupyterviz using Test import GAP_pkg_jupyterviz +import GAP_pkg_jupyterviz.GAP + +# verify loading works GAP_pkg_jupyterviz.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("jupyterviz")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_kan/test/Project.toml b/GAP_pkg_kan/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_kan/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_kan/test/runtests.jl b/GAP_pkg_kan/test/runtests.jl index 93a5897..8fc7cb9 100644 --- a/GAP_pkg_kan/test/runtests.jl +++ b/GAP_pkg_kan/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_kan using Test import GAP_pkg_kan +import GAP_pkg_kan.GAP + +# verify loading works GAP_pkg_kan.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("kan")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_kbmag/test/Project.toml b/GAP_pkg_kbmag/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_kbmag/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_kbmag/test/runtests.jl b/GAP_pkg_kbmag/test/runtests.jl index f20c5ff..7738b8a 100644 --- a/GAP_pkg_kbmag/test/runtests.jl +++ b/GAP_pkg_kbmag/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_kbmag using Test import GAP_pkg_kbmag +import GAP_pkg_kbmag.GAP + +# verify loading works GAP_pkg_kbmag.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("kbmag")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_laguna/test/Project.toml b/GAP_pkg_laguna/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_laguna/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_laguna/test/runtests.jl b/GAP_pkg_laguna/test/runtests.jl index 47b866f..c9a9e9d 100644 --- a/GAP_pkg_laguna/test/runtests.jl +++ b/GAP_pkg_laguna/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_laguna using Test import GAP_pkg_laguna +import GAP_pkg_laguna.GAP + +# verify loading works GAP_pkg_laguna.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("laguna")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_liealgdb/test/Project.toml b/GAP_pkg_liealgdb/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_liealgdb/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_liealgdb/test/runtests.jl b/GAP_pkg_liealgdb/test/runtests.jl index 9d57138..0221f4b 100644 --- a/GAP_pkg_liealgdb/test/runtests.jl +++ b/GAP_pkg_liealgdb/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_liealgdb using Test import GAP_pkg_liealgdb +import GAP_pkg_liealgdb.GAP + +# verify loading works GAP_pkg_liealgdb.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("liealgdb")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_liepring/test/Project.toml b/GAP_pkg_liepring/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_liepring/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_liepring/test/runtests.jl b/GAP_pkg_liepring/test/runtests.jl index bf9b6e4..c19caa6 100644 --- a/GAP_pkg_liepring/test/runtests.jl +++ b/GAP_pkg_liepring/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_liepring using Test import GAP_pkg_liepring +import GAP_pkg_liepring.GAP + +# verify loading works GAP_pkg_liepring.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("liepring")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_liering/test/Project.toml b/GAP_pkg_liering/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_liering/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_liering/test/runtests.jl b/GAP_pkg_liering/test/runtests.jl index 56180e9..000c9f2 100644 --- a/GAP_pkg_liering/test/runtests.jl +++ b/GAP_pkg_liering/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_liering using Test import GAP_pkg_liering +import GAP_pkg_liering.GAP + +# verify loading works GAP_pkg_liering.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("liering")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_linearalgebraforcap/test/Project.toml b/GAP_pkg_linearalgebraforcap/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_linearalgebraforcap/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_linearalgebraforcap/test/runtests.jl b/GAP_pkg_linearalgebraforcap/test/runtests.jl index 65eb3b8..8a9034f 100644 --- a/GAP_pkg_linearalgebraforcap/test/runtests.jl +++ b/GAP_pkg_linearalgebraforcap/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_linearalgebraforcap using Test import GAP_pkg_linearalgebraforcap +import GAP_pkg_linearalgebraforcap.GAP + +# verify loading works GAP_pkg_linearalgebraforcap.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("linearalgebraforcap")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_localizeringforhomalg/test/Project.toml b/GAP_pkg_localizeringforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_localizeringforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_localizeringforhomalg/test/runtests.jl b/GAP_pkg_localizeringforhomalg/test/runtests.jl index 14d0ba7..e7917b2 100644 --- a/GAP_pkg_localizeringforhomalg/test/runtests.jl +++ b/GAP_pkg_localizeringforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_localizeringforhomalg using Test import GAP_pkg_localizeringforhomalg +import GAP_pkg_localizeringforhomalg.GAP + +# verify loading works GAP_pkg_localizeringforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("localizeringforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_loops/test/Project.toml b/GAP_pkg_loops/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_loops/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_loops/test/runtests.jl b/GAP_pkg_loops/test/runtests.jl index acf3126..eb9dd83 100644 --- a/GAP_pkg_loops/test/runtests.jl +++ b/GAP_pkg_loops/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_loops using Test import GAP_pkg_loops +import GAP_pkg_loops.GAP + +# verify loading works GAP_pkg_loops.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("loops")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_lpres/test/Project.toml b/GAP_pkg_lpres/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_lpres/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_lpres/test/runtests.jl b/GAP_pkg_lpres/test/runtests.jl index 4565193..1d69586 100644 --- a/GAP_pkg_lpres/test/runtests.jl +++ b/GAP_pkg_lpres/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_lpres using Test import GAP_pkg_lpres +import GAP_pkg_lpres.GAP + +# verify loading works GAP_pkg_lpres.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("lpres")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_majoranaalgebras/test/Project.toml b/GAP_pkg_majoranaalgebras/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_majoranaalgebras/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_majoranaalgebras/test/runtests.jl b/GAP_pkg_majoranaalgebras/test/runtests.jl index 73fc126..f115b0c 100644 --- a/GAP_pkg_majoranaalgebras/test/runtests.jl +++ b/GAP_pkg_majoranaalgebras/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_majoranaalgebras using Test import GAP_pkg_majoranaalgebras +import GAP_pkg_majoranaalgebras.GAP + +# verify loading works GAP_pkg_majoranaalgebras.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("majoranaalgebras")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_mapclass/test/Project.toml b/GAP_pkg_mapclass/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_mapclass/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_mapclass/test/runtests.jl b/GAP_pkg_mapclass/test/runtests.jl index 1b08eda..401b2e8 100644 --- a/GAP_pkg_mapclass/test/runtests.jl +++ b/GAP_pkg_mapclass/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_mapclass using Test import GAP_pkg_mapclass +import GAP_pkg_mapclass.GAP + +# verify loading works GAP_pkg_mapclass.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("mapclass")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_matgrp/test/Project.toml b/GAP_pkg_matgrp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_matgrp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_matgrp/test/runtests.jl b/GAP_pkg_matgrp/test/runtests.jl index 44b2d4d..4de38b6 100644 --- a/GAP_pkg_matgrp/test/runtests.jl +++ b/GAP_pkg_matgrp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_matgrp using Test import GAP_pkg_matgrp +import GAP_pkg_matgrp.GAP + +# verify loading works GAP_pkg_matgrp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("matgrp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_matricesforhomalg/test/Project.toml b/GAP_pkg_matricesforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_matricesforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_matricesforhomalg/test/runtests.jl b/GAP_pkg_matricesforhomalg/test/runtests.jl index 29647f6..04c9b42 100644 --- a/GAP_pkg_matricesforhomalg/test/runtests.jl +++ b/GAP_pkg_matricesforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_matricesforhomalg using Test import GAP_pkg_matricesforhomalg +import GAP_pkg_matricesforhomalg.GAP + +# verify loading works GAP_pkg_matricesforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("matricesforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_modisom/test/Project.toml b/GAP_pkg_modisom/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_modisom/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_modisom/test/runtests.jl b/GAP_pkg_modisom/test/runtests.jl index deace30..80d9649 100644 --- a/GAP_pkg_modisom/test/runtests.jl +++ b/GAP_pkg_modisom/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_modisom using Test import GAP_pkg_modisom +import GAP_pkg_modisom.GAP + +# verify loading works GAP_pkg_modisom.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("modisom")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_modulepresentationsforcap/test/Project.toml b/GAP_pkg_modulepresentationsforcap/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_modulepresentationsforcap/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_modulepresentationsforcap/test/runtests.jl b/GAP_pkg_modulepresentationsforcap/test/runtests.jl index 1b99a22..b8bf454 100644 --- a/GAP_pkg_modulepresentationsforcap/test/runtests.jl +++ b/GAP_pkg_modulepresentationsforcap/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_modulepresentationsforcap using Test import GAP_pkg_modulepresentationsforcap +import GAP_pkg_modulepresentationsforcap.GAP + +# verify loading works GAP_pkg_modulepresentationsforcap.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("modulepresentationsforcap")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_modules/test/Project.toml b/GAP_pkg_modules/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_modules/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_modules/test/runtests.jl b/GAP_pkg_modules/test/runtests.jl index a625044..b093bd0 100644 --- a/GAP_pkg_modules/test/runtests.jl +++ b/GAP_pkg_modules/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_modules using Test import GAP_pkg_modules +import GAP_pkg_modules.GAP + +# verify loading works GAP_pkg_modules.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("modules")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_monoidalcategories/test/Project.toml b/GAP_pkg_monoidalcategories/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_monoidalcategories/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_monoidalcategories/test/runtests.jl b/GAP_pkg_monoidalcategories/test/runtests.jl index e7ed6cf..ea71d60 100644 --- a/GAP_pkg_monoidalcategories/test/runtests.jl +++ b/GAP_pkg_monoidalcategories/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_monoidalcategories using Test import GAP_pkg_monoidalcategories +import GAP_pkg_monoidalcategories.GAP + +# verify loading works GAP_pkg_monoidalcategories.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("monoidalcategories")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_nconvex/test/Project.toml b/GAP_pkg_nconvex/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_nconvex/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_nconvex/test/runtests.jl b/GAP_pkg_nconvex/test/runtests.jl index 1fd0338..3821fc4 100644 --- a/GAP_pkg_nconvex/test/runtests.jl +++ b/GAP_pkg_nconvex/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_nconvex using Test import GAP_pkg_nconvex +import GAP_pkg_nconvex.GAP + +# verify loading works GAP_pkg_nconvex.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("nconvex")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_nilmat/test/Project.toml b/GAP_pkg_nilmat/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_nilmat/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_nilmat/test/runtests.jl b/GAP_pkg_nilmat/test/runtests.jl index 74e777e..9a11fd1 100644 --- a/GAP_pkg_nilmat/test/runtests.jl +++ b/GAP_pkg_nilmat/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_nilmat using Test import GAP_pkg_nilmat +import GAP_pkg_nilmat.GAP + +# verify loading works GAP_pkg_nilmat.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("nilmat")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_nock/test/Project.toml b/GAP_pkg_nock/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_nock/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_nock/test/runtests.jl b/GAP_pkg_nock/test/runtests.jl index ce17748..06a4d8d 100644 --- a/GAP_pkg_nock/test/runtests.jl +++ b/GAP_pkg_nock/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_nock using Test import GAP_pkg_nock +import GAP_pkg_nock.GAP + +# verify loading works GAP_pkg_nock.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("nock")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_normalizinterface/test/Project.toml b/GAP_pkg_normalizinterface/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_normalizinterface/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_normalizinterface/test/runtests.jl b/GAP_pkg_normalizinterface/test/runtests.jl index d99c9f2..deaadab 100644 --- a/GAP_pkg_normalizinterface/test/runtests.jl +++ b/GAP_pkg_normalizinterface/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_normalizinterface using Test import GAP_pkg_normalizinterface +import GAP_pkg_normalizinterface.GAP + +# verify loading works GAP_pkg_normalizinterface.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("normalizinterface")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_nq/test/Project.toml b/GAP_pkg_nq/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_nq/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_nq/test/runtests.jl b/GAP_pkg_nq/test/runtests.jl index fc98d85..3f24e30 100644 --- a/GAP_pkg_nq/test/runtests.jl +++ b/GAP_pkg_nq/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_nq using Test import GAP_pkg_nq +import GAP_pkg_nq.GAP + +# verify loading works GAP_pkg_nq.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("nq")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_numericalsgps/test/Project.toml b/GAP_pkg_numericalsgps/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_numericalsgps/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_numericalsgps/test/runtests.jl b/GAP_pkg_numericalsgps/test/runtests.jl index d8feea6..53c2e15 100644 --- a/GAP_pkg_numericalsgps/test/runtests.jl +++ b/GAP_pkg_numericalsgps/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_numericalsgps using Test import GAP_pkg_numericalsgps +import GAP_pkg_numericalsgps.GAP + +# verify loading works GAP_pkg_numericalsgps.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("numericalsgps")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_openmath/test/Project.toml b/GAP_pkg_openmath/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_openmath/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_openmath/test/runtests.jl b/GAP_pkg_openmath/test/runtests.jl index 801ed28..229a502 100644 --- a/GAP_pkg_openmath/test/runtests.jl +++ b/GAP_pkg_openmath/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_openmath using Test import GAP_pkg_openmath +import GAP_pkg_openmath.GAP + +# verify loading works GAP_pkg_openmath.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("openmath")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_orb/test/Project.toml b/GAP_pkg_orb/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_orb/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_orb/test/runtests.jl b/GAP_pkg_orb/test/runtests.jl index be11c1c..cd68a8c 100644 --- a/GAP_pkg_orb/test/runtests.jl +++ b/GAP_pkg_orb/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_orb using Test import GAP_pkg_orb +import GAP_pkg_orb.GAP + +# verify loading works GAP_pkg_orb.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("orb")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_packagemanager/test/Project.toml b/GAP_pkg_packagemanager/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_packagemanager/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_packagemanager/test/runtests.jl b/GAP_pkg_packagemanager/test/runtests.jl index 3570a08..c8bbe59 100644 --- a/GAP_pkg_packagemanager/test/runtests.jl +++ b/GAP_pkg_packagemanager/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_packagemanager using Test import GAP_pkg_packagemanager +import GAP_pkg_packagemanager.GAP + +# verify loading works GAP_pkg_packagemanager.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("packagemanager")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_patternclass/test/Project.toml b/GAP_pkg_patternclass/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_patternclass/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_patternclass/test/runtests.jl b/GAP_pkg_patternclass/test/runtests.jl index 32f858f..c960673 100644 --- a/GAP_pkg_patternclass/test/runtests.jl +++ b/GAP_pkg_patternclass/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_patternclass using Test import GAP_pkg_patternclass +import GAP_pkg_patternclass.GAP + +# verify loading works GAP_pkg_patternclass.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("patternclass")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_permut/test/Project.toml b/GAP_pkg_permut/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_permut/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_permut/test/runtests.jl b/GAP_pkg_permut/test/runtests.jl index 14242b2..86832fa 100644 --- a/GAP_pkg_permut/test/runtests.jl +++ b/GAP_pkg_permut/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_permut using Test import GAP_pkg_permut +import GAP_pkg_permut.GAP + +# verify loading works GAP_pkg_permut.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("permut")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_polenta/test/Project.toml b/GAP_pkg_polenta/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_polenta/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_polenta/test/runtests.jl b/GAP_pkg_polenta/test/runtests.jl index 1f27bcc..6c03229 100644 --- a/GAP_pkg_polenta/test/runtests.jl +++ b/GAP_pkg_polenta/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_polenta using Test import GAP_pkg_polenta +import GAP_pkg_polenta.GAP + +# verify loading works GAP_pkg_polenta.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("polenta")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_polycyclic/test/Project.toml b/GAP_pkg_polycyclic/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_polycyclic/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_polycyclic/test/runtests.jl b/GAP_pkg_polycyclic/test/runtests.jl index 9a2b32a..e66b369 100644 --- a/GAP_pkg_polycyclic/test/runtests.jl +++ b/GAP_pkg_polycyclic/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_polycyclic using Test import GAP_pkg_polycyclic +import GAP_pkg_polycyclic.GAP + +# verify loading works GAP_pkg_polycyclic.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("polycyclic")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_polymaking/test/Project.toml b/GAP_pkg_polymaking/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_polymaking/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_polymaking/test/runtests.jl b/GAP_pkg_polymaking/test/runtests.jl index 1e61d19..b89ced5 100644 --- a/GAP_pkg_polymaking/test/runtests.jl +++ b/GAP_pkg_polymaking/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_polymaking using Test import GAP_pkg_polymaking +import GAP_pkg_polymaking.GAP + +# verify loading works GAP_pkg_polymaking.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("polymaking")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_primgrp/test/Project.toml b/GAP_pkg_primgrp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_primgrp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_primgrp/test/runtests.jl b/GAP_pkg_primgrp/test/runtests.jl index a920bb7..563d06f 100644 --- a/GAP_pkg_primgrp/test/runtests.jl +++ b/GAP_pkg_primgrp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_primgrp using Test import GAP_pkg_primgrp +import GAP_pkg_primgrp.GAP + +# verify loading works GAP_pkg_primgrp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("primgrp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_profiling/test/Project.toml b/GAP_pkg_profiling/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_profiling/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_profiling/test/runtests.jl b/GAP_pkg_profiling/test/runtests.jl index 7099306..620357e 100644 --- a/GAP_pkg_profiling/test/runtests.jl +++ b/GAP_pkg_profiling/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_profiling using Test import GAP_pkg_profiling +import GAP_pkg_profiling.GAP + +# verify loading works GAP_pkg_profiling.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("profiling")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_qpa/test/Project.toml b/GAP_pkg_qpa/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_qpa/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_qpa/test/runtests.jl b/GAP_pkg_qpa/test/runtests.jl index f2d192a..fb710dd 100644 --- a/GAP_pkg_qpa/test/runtests.jl +++ b/GAP_pkg_qpa/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_qpa using Test import GAP_pkg_qpa +import GAP_pkg_qpa.GAP + +# verify loading works GAP_pkg_qpa.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("qpa")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_quagroup/test/Project.toml b/GAP_pkg_quagroup/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_quagroup/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_quagroup/test/runtests.jl b/GAP_pkg_quagroup/test/runtests.jl index 196a24d..302986f 100644 --- a/GAP_pkg_quagroup/test/runtests.jl +++ b/GAP_pkg_quagroup/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_quagroup using Test import GAP_pkg_quagroup +import GAP_pkg_quagroup.GAP + +# verify loading works GAP_pkg_quagroup.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("quagroup")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_radiroot/test/Project.toml b/GAP_pkg_radiroot/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_radiroot/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_radiroot/test/runtests.jl b/GAP_pkg_radiroot/test/runtests.jl index 84f093b..74bce21 100644 --- a/GAP_pkg_radiroot/test/runtests.jl +++ b/GAP_pkg_radiroot/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_radiroot using Test import GAP_pkg_radiroot +import GAP_pkg_radiroot.GAP + +# verify loading works GAP_pkg_radiroot.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("radiroot")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_rcwa/test/Project.toml b/GAP_pkg_rcwa/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_rcwa/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_rcwa/test/runtests.jl b/GAP_pkg_rcwa/test/runtests.jl index e6a11d1..460ce70 100644 --- a/GAP_pkg_rcwa/test/runtests.jl +++ b/GAP_pkg_rcwa/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_rcwa using Test import GAP_pkg_rcwa +import GAP_pkg_rcwa.GAP + +# verify loading works GAP_pkg_rcwa.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("rcwa")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_rds/test/Project.toml b/GAP_pkg_rds/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_rds/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_rds/test/runtests.jl b/GAP_pkg_rds/test/runtests.jl index be74cf9..13a7d73 100644 --- a/GAP_pkg_rds/test/runtests.jl +++ b/GAP_pkg_rds/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_rds using Test import GAP_pkg_rds +import GAP_pkg_rds.GAP + +# verify loading works GAP_pkg_rds.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("rds")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_recog/test/Project.toml b/GAP_pkg_recog/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_recog/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_recog/test/runtests.jl b/GAP_pkg_recog/test/runtests.jl index 8150fab..f7e4a0b 100644 --- a/GAP_pkg_recog/test/runtests.jl +++ b/GAP_pkg_recog/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_recog using Test import GAP_pkg_recog +import GAP_pkg_recog.GAP + +# verify loading works GAP_pkg_recog.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("recog")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_repndecomp/test/Project.toml b/GAP_pkg_repndecomp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_repndecomp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_repndecomp/test/runtests.jl b/GAP_pkg_repndecomp/test/runtests.jl index 3d73591..e41cef7 100644 --- a/GAP_pkg_repndecomp/test/runtests.jl +++ b/GAP_pkg_repndecomp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_repndecomp using Test import GAP_pkg_repndecomp +import GAP_pkg_repndecomp.GAP + +# verify loading works GAP_pkg_repndecomp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("repndecomp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_repsn/test/Project.toml b/GAP_pkg_repsn/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_repsn/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_repsn/test/runtests.jl b/GAP_pkg_repsn/test/runtests.jl index a8e9e70..a65c9b3 100644 --- a/GAP_pkg_repsn/test/runtests.jl +++ b/GAP_pkg_repsn/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_repsn using Test import GAP_pkg_repsn +import GAP_pkg_repsn.GAP + +# verify loading works GAP_pkg_repsn.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("repsn")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_resclasses/test/Project.toml b/GAP_pkg_resclasses/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_resclasses/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_resclasses/test/runtests.jl b/GAP_pkg_resclasses/test/runtests.jl index b73da3f..c53e182 100644 --- a/GAP_pkg_resclasses/test/runtests.jl +++ b/GAP_pkg_resclasses/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_resclasses using Test import GAP_pkg_resclasses +import GAP_pkg_resclasses.GAP + +# verify loading works GAP_pkg_resclasses.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("resclasses")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_ringsforhomalg/test/Project.toml b/GAP_pkg_ringsforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_ringsforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_ringsforhomalg/test/runtests.jl b/GAP_pkg_ringsforhomalg/test/runtests.jl index b5ebaa5..014cd95 100644 --- a/GAP_pkg_ringsforhomalg/test/runtests.jl +++ b/GAP_pkg_ringsforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_ringsforhomalg using Test import GAP_pkg_ringsforhomalg +import GAP_pkg_ringsforhomalg.GAP + +# verify loading works GAP_pkg_ringsforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("ringsforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sco/test/Project.toml b/GAP_pkg_sco/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sco/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sco/test/runtests.jl b/GAP_pkg_sco/test/runtests.jl index 6743144..8ea73ac 100644 --- a/GAP_pkg_sco/test/runtests.jl +++ b/GAP_pkg_sco/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sco using Test import GAP_pkg_sco +import GAP_pkg_sco.GAP + +# verify loading works GAP_pkg_sco.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sco")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_scscp/test/Project.toml b/GAP_pkg_scscp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_scscp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_scscp/test/runtests.jl b/GAP_pkg_scscp/test/runtests.jl index 253d5ef..70d579c 100644 --- a/GAP_pkg_scscp/test/runtests.jl +++ b/GAP_pkg_scscp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_scscp using Test import GAP_pkg_scscp +import GAP_pkg_scscp.GAP + +# verify loading works GAP_pkg_scscp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("scscp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_semigroups/test/Project.toml b/GAP_pkg_semigroups/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_semigroups/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_semigroups/test/runtests.jl b/GAP_pkg_semigroups/test/runtests.jl index 25d4865..900ec82 100644 --- a/GAP_pkg_semigroups/test/runtests.jl +++ b/GAP_pkg_semigroups/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_semigroups using Test import GAP_pkg_semigroups +import GAP_pkg_semigroups.GAP + +# verify loading works GAP_pkg_semigroups.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("semigroups")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sglppow/test/Project.toml b/GAP_pkg_sglppow/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sglppow/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sglppow/test/runtests.jl b/GAP_pkg_sglppow/test/runtests.jl index 57e8e09..e947540 100644 --- a/GAP_pkg_sglppow/test/runtests.jl +++ b/GAP_pkg_sglppow/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sglppow using Test import GAP_pkg_sglppow +import GAP_pkg_sglppow.GAP + +# verify loading works GAP_pkg_sglppow.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sglppow")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sgpviz/test/Project.toml b/GAP_pkg_sgpviz/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sgpviz/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sgpviz/test/runtests.jl b/GAP_pkg_sgpviz/test/runtests.jl index a4ae7ca..fb60ca1 100644 --- a/GAP_pkg_sgpviz/test/runtests.jl +++ b/GAP_pkg_sgpviz/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sgpviz using Test import GAP_pkg_sgpviz +import GAP_pkg_sgpviz.GAP + +# verify loading works GAP_pkg_sgpviz.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sgpviz")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_simpcomp/test/Project.toml b/GAP_pkg_simpcomp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_simpcomp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_simpcomp/test/runtests.jl b/GAP_pkg_simpcomp/test/runtests.jl index 26e7aed..8777bff 100644 --- a/GAP_pkg_simpcomp/test/runtests.jl +++ b/GAP_pkg_simpcomp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_simpcomp using Test import GAP_pkg_simpcomp +import GAP_pkg_simpcomp.GAP + +# verify loading works GAP_pkg_simpcomp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("simpcomp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_singular/test/Project.toml b/GAP_pkg_singular/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_singular/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_singular/test/runtests.jl b/GAP_pkg_singular/test/runtests.jl index c86d637..414ed01 100644 --- a/GAP_pkg_singular/test/runtests.jl +++ b/GAP_pkg_singular/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_singular using Test import GAP_pkg_singular +import GAP_pkg_singular.GAP + +# verify loading works GAP_pkg_singular.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("singular")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sl2reps/test/Project.toml b/GAP_pkg_sl2reps/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sl2reps/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sl2reps/test/runtests.jl b/GAP_pkg_sl2reps/test/runtests.jl index 611d269..f372a7d 100644 --- a/GAP_pkg_sl2reps/test/runtests.jl +++ b/GAP_pkg_sl2reps/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sl2reps using Test import GAP_pkg_sl2reps +import GAP_pkg_sl2reps.GAP + +# verify loading works GAP_pkg_sl2reps.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sl2reps")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sla/test/Project.toml b/GAP_pkg_sla/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sla/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sla/test/runtests.jl b/GAP_pkg_sla/test/runtests.jl index 9ecbeb0..a1cda6d 100644 --- a/GAP_pkg_sla/test/runtests.jl +++ b/GAP_pkg_sla/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sla using Test import GAP_pkg_sla +import GAP_pkg_sla.GAP + +# verify loading works GAP_pkg_sla.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sla")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_smallgrp/test/Project.toml b/GAP_pkg_smallgrp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_smallgrp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_smallgrp/test/runtests.jl b/GAP_pkg_smallgrp/test/runtests.jl index cf2aea6..b97f942 100644 --- a/GAP_pkg_smallgrp/test/runtests.jl +++ b/GAP_pkg_smallgrp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_smallgrp using Test import GAP_pkg_smallgrp +import GAP_pkg_smallgrp.GAP + +# verify loading works GAP_pkg_smallgrp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("smallgrp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_smallsemi/test/Project.toml b/GAP_pkg_smallsemi/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_smallsemi/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_smallsemi/test/runtests.jl b/GAP_pkg_smallsemi/test/runtests.jl index 5768c24..ad38c0a 100644 --- a/GAP_pkg_smallsemi/test/runtests.jl +++ b/GAP_pkg_smallsemi/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_smallsemi using Test import GAP_pkg_smallsemi +import GAP_pkg_smallsemi.GAP + +# verify loading works GAP_pkg_smallsemi.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("smallsemi")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sonata/test/Project.toml b/GAP_pkg_sonata/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sonata/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sonata/test/runtests.jl b/GAP_pkg_sonata/test/runtests.jl index 1b8c1ed..9e2b6f9 100644 --- a/GAP_pkg_sonata/test/runtests.jl +++ b/GAP_pkg_sonata/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sonata using Test import GAP_pkg_sonata +import GAP_pkg_sonata.GAP + +# verify loading works GAP_pkg_sonata.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sonata")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_sophus/test/Project.toml b/GAP_pkg_sophus/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_sophus/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_sophus/test/runtests.jl b/GAP_pkg_sophus/test/runtests.jl index 4b12899..942ee65 100644 --- a/GAP_pkg_sophus/test/runtests.jl +++ b/GAP_pkg_sophus/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_sophus using Test import GAP_pkg_sophus +import GAP_pkg_sophus.GAP + +# verify loading works GAP_pkg_sophus.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("sophus")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_spinsym/test/Project.toml b/GAP_pkg_spinsym/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_spinsym/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_spinsym/test/runtests.jl b/GAP_pkg_spinsym/test/runtests.jl index 046a7e0..72acad6 100644 --- a/GAP_pkg_spinsym/test/runtests.jl +++ b/GAP_pkg_spinsym/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_spinsym using Test import GAP_pkg_spinsym +import GAP_pkg_spinsym.GAP + +# verify loading works GAP_pkg_spinsym.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("spinsym")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_standardff/test/Project.toml b/GAP_pkg_standardff/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_standardff/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_standardff/test/runtests.jl b/GAP_pkg_standardff/test/runtests.jl index 598a15b..2f3013f 100644 --- a/GAP_pkg_standardff/test/runtests.jl +++ b/GAP_pkg_standardff/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_standardff using Test import GAP_pkg_standardff +import GAP_pkg_standardff.GAP + +# verify loading works GAP_pkg_standardff.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("standardff")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_symbcompcc/test/Project.toml b/GAP_pkg_symbcompcc/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_symbcompcc/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_symbcompcc/test/runtests.jl b/GAP_pkg_symbcompcc/test/runtests.jl index 9ac0643..bdbaf06 100644 --- a/GAP_pkg_symbcompcc/test/runtests.jl +++ b/GAP_pkg_symbcompcc/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_symbcompcc using Test import GAP_pkg_symbcompcc +import GAP_pkg_symbcompcc.GAP + +# verify loading works GAP_pkg_symbcompcc.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("symbcompcc")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_thelma/test/Project.toml b/GAP_pkg_thelma/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_thelma/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_thelma/test/runtests.jl b/GAP_pkg_thelma/test/runtests.jl index 0cdb8f9..bb194ef 100644 --- a/GAP_pkg_thelma/test/runtests.jl +++ b/GAP_pkg_thelma/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_thelma using Test import GAP_pkg_thelma +import GAP_pkg_thelma.GAP + +# verify loading works GAP_pkg_thelma.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("thelma")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_tomlib/test/Project.toml b/GAP_pkg_tomlib/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_tomlib/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_tomlib/test/runtests.jl b/GAP_pkg_tomlib/test/runtests.jl index 02bf832..74fd6e2 100644 --- a/GAP_pkg_tomlib/test/runtests.jl +++ b/GAP_pkg_tomlib/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_tomlib using Test import GAP_pkg_tomlib +import GAP_pkg_tomlib.GAP + +# verify loading works GAP_pkg_tomlib.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("tomlib")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_toolsforhomalg/test/Project.toml b/GAP_pkg_toolsforhomalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_toolsforhomalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_toolsforhomalg/test/runtests.jl b/GAP_pkg_toolsforhomalg/test/runtests.jl index d132600..58c1667 100644 --- a/GAP_pkg_toolsforhomalg/test/runtests.jl +++ b/GAP_pkg_toolsforhomalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_toolsforhomalg using Test import GAP_pkg_toolsforhomalg +import GAP_pkg_toolsforhomalg.GAP + +# verify loading works GAP_pkg_toolsforhomalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("toolsforhomalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_toric/test/Project.toml b/GAP_pkg_toric/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_toric/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_toric/test/runtests.jl b/GAP_pkg_toric/test/runtests.jl index 4f15021..f55669c 100644 --- a/GAP_pkg_toric/test/runtests.jl +++ b/GAP_pkg_toric/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_toric using Test import GAP_pkg_toric +import GAP_pkg_toric.GAP + +# verify loading works GAP_pkg_toric.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("toric")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_toricvarieties/test/Project.toml b/GAP_pkg_toricvarieties/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_toricvarieties/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_toricvarieties/test/runtests.jl b/GAP_pkg_toricvarieties/test/runtests.jl index 0cb7b10..5613fbc 100644 --- a/GAP_pkg_toricvarieties/test/runtests.jl +++ b/GAP_pkg_toricvarieties/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_toricvarieties using Test import GAP_pkg_toricvarieties +import GAP_pkg_toricvarieties.GAP + +# verify loading works GAP_pkg_toricvarieties.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("toricvarieties")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_transgrp/test/Project.toml b/GAP_pkg_transgrp/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_transgrp/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_transgrp/test/runtests.jl b/GAP_pkg_transgrp/test/runtests.jl index dcee86a..0942b9d 100644 --- a/GAP_pkg_transgrp/test/runtests.jl +++ b/GAP_pkg_transgrp/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_transgrp using Test import GAP_pkg_transgrp +import GAP_pkg_transgrp.GAP + +# verify loading works GAP_pkg_transgrp.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("transgrp")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_ugaly/test/Project.toml b/GAP_pkg_ugaly/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_ugaly/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_ugaly/test/runtests.jl b/GAP_pkg_ugaly/test/runtests.jl index ce6cf4c..4f08696 100644 --- a/GAP_pkg_ugaly/test/runtests.jl +++ b/GAP_pkg_ugaly/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_ugaly using Test import GAP_pkg_ugaly +import GAP_pkg_ugaly.GAP + +# verify loading works GAP_pkg_ugaly.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("ugaly")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_unipot/test/Project.toml b/GAP_pkg_unipot/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_unipot/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_unipot/test/runtests.jl b/GAP_pkg_unipot/test/runtests.jl index 4ef23e5..1a7e612 100644 --- a/GAP_pkg_unipot/test/runtests.jl +++ b/GAP_pkg_unipot/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_unipot using Test import GAP_pkg_unipot +import GAP_pkg_unipot.GAP + +# verify loading works GAP_pkg_unipot.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("unipot")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_unitlib/test/Project.toml b/GAP_pkg_unitlib/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_unitlib/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_unitlib/test/runtests.jl b/GAP_pkg_unitlib/test/runtests.jl index cd43b15..6d544fe 100644 --- a/GAP_pkg_unitlib/test/runtests.jl +++ b/GAP_pkg_unitlib/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_unitlib using Test import GAP_pkg_unitlib +import GAP_pkg_unitlib.GAP + +# verify loading works GAP_pkg_unitlib.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("unitlib")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_utils/test/Project.toml b/GAP_pkg_utils/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_utils/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_utils/test/runtests.jl b/GAP_pkg_utils/test/runtests.jl index 2d95b13..5bbb568 100644 --- a/GAP_pkg_utils/test/runtests.jl +++ b/GAP_pkg_utils/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_utils using Test import GAP_pkg_utils +import GAP_pkg_utils.GAP + +# verify loading works GAP_pkg_utils.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("utils")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_uuid/test/Project.toml b/GAP_pkg_uuid/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_uuid/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_uuid/test/runtests.jl b/GAP_pkg_uuid/test/runtests.jl index 10aac41..7df5b9d 100644 --- a/GAP_pkg_uuid/test/runtests.jl +++ b/GAP_pkg_uuid/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_uuid using Test import GAP_pkg_uuid +import GAP_pkg_uuid.GAP + +# verify loading works GAP_pkg_uuid.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("uuid")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_walrus/test/Project.toml b/GAP_pkg_walrus/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_walrus/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_walrus/test/runtests.jl b/GAP_pkg_walrus/test/runtests.jl index 74d3a36..d66f063 100644 --- a/GAP_pkg_walrus/test/runtests.jl +++ b/GAP_pkg_walrus/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_walrus using Test import GAP_pkg_walrus +import GAP_pkg_walrus.GAP + +# verify loading works GAP_pkg_walrus.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("walrus")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_wedderga/test/Project.toml b/GAP_pkg_wedderga/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_wedderga/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_wedderga/test/runtests.jl b/GAP_pkg_wedderga/test/runtests.jl index e1cd80e..f47ccd1 100644 --- a/GAP_pkg_wedderga/test/runtests.jl +++ b/GAP_pkg_wedderga/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_wedderga using Test import GAP_pkg_wedderga +import GAP_pkg_wedderga.GAP + +# verify loading works GAP_pkg_wedderga.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("wedderga")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_xgap/test/Project.toml b/GAP_pkg_xgap/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_xgap/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_xgap/test/runtests.jl b/GAP_pkg_xgap/test/runtests.jl index 0ee3125..164b9c0 100644 --- a/GAP_pkg_xgap/test/runtests.jl +++ b/GAP_pkg_xgap/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_xgap using Test import GAP_pkg_xgap +import GAP_pkg_xgap.GAP + +# verify loading works GAP_pkg_xgap.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("xgap")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_xmod/test/Project.toml b/GAP_pkg_xmod/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_xmod/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_xmod/test/runtests.jl b/GAP_pkg_xmod/test/runtests.jl index f5374ae..166809f 100644 --- a/GAP_pkg_xmod/test/runtests.jl +++ b/GAP_pkg_xmod/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_xmod using Test import GAP_pkg_xmod +import GAP_pkg_xmod.GAP + +# verify loading works GAP_pkg_xmod.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("xmod")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_xmodalg/test/Project.toml b/GAP_pkg_xmodalg/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_xmodalg/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_xmodalg/test/runtests.jl b/GAP_pkg_xmodalg/test/runtests.jl index 2c5234f..85fb930 100644 --- a/GAP_pkg_xmodalg/test/runtests.jl +++ b/GAP_pkg_xmodalg/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_xmodalg using Test import GAP_pkg_xmodalg +import GAP_pkg_xmodalg.GAP + +# verify loading works GAP_pkg_xmodalg.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("xmodalg")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_yangbaxter/test/Project.toml b/GAP_pkg_yangbaxter/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_yangbaxter/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_yangbaxter/test/runtests.jl b/GAP_pkg_yangbaxter/test/runtests.jl index 271902c..779ba37 100644 --- a/GAP_pkg_yangbaxter/test/runtests.jl +++ b/GAP_pkg_yangbaxter/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_yangbaxter using Test import GAP_pkg_yangbaxter +import GAP_pkg_yangbaxter.GAP + +# verify loading works GAP_pkg_yangbaxter.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("yangbaxter")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/GAP_pkg_zeromqinterface/test/Project.toml b/GAP_pkg_zeromqinterface/test/Project.toml new file mode 100644 index 0000000..d04682e --- /dev/null +++ b/GAP_pkg_zeromqinterface/test/Project.toml @@ -0,0 +1,4 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] diff --git a/GAP_pkg_zeromqinterface/test/runtests.jl b/GAP_pkg_zeromqinterface/test/runtests.jl index 8294eb9..de764b0 100644 --- a/GAP_pkg_zeromqinterface/test/runtests.jl +++ b/GAP_pkg_zeromqinterface/test/runtests.jl @@ -1,5 +1,49 @@ -using GAP_pkg_zeromqinterface using Test import GAP_pkg_zeromqinterface +import GAP_pkg_zeromqinterface.GAP + +# verify loading works GAP_pkg_zeromqinterface.load() + +# run package test suite +# we need to hack around the fact that most of them end with quitting +# the running process... +# TODO: allow specifying a collection of (name => value) pairs... +function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end +end + +error_occurred = false +function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end +end + +GAP.disable_error_handler[] = true +try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("zeromqinterface")) + end + end + end +finally + GAP.disable_error_handler[] = false +end + +@test !error_occurred diff --git a/generate_wrapper.jl b/generate_wrapper.jl index 656a278..c0e91b1 100644 --- a/generate_wrapper.jl +++ b/generate_wrapper.jl @@ -263,13 +263,66 @@ function update_pkg(pkginfo) # generate a simple test # mkpath("$(julia_pkgname)/test") + open(joinpath(julia_pkgname, "test", "Project.toml"), "w") do f + write(f,""" + [deps] + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + + [compat] + """) + end + open(joinpath(julia_pkgname, "test", "runtests.jl"), "w") do f write(f,""" - using $julia_pkgname using Test import $julia_pkgname + import $julia_pkgname.GAP + + # verify loading works $julia_pkgname.load() + + # run package test suite + # we need to hack around the fact that most of them end with quitting + # the running process... + # TODO: allow specifying a collection of (name => value) pairs... + function with_gap_var(f, n::String, val) + name = GAP.Obj(n) + old_value = GAP.Globals.ValueGlobal(name) + GAP.Globals.MakeReadWriteGlobal(name) + GAP.Globals.UnbindGlobal(name) + GAP.Globals.BindGlobal(name, val) + try + f() + finally + GAP.Globals.MakeReadWriteGlobal(name); + GAP.Globals.UnbindGlobal(name); + GAP.Globals.BindGlobal(name, old_value); + end + end + + error_occurred = false + function fake_QuitGap(code) + global error_occurred + if code != 0 + error_occurred = true + end + end + + GAP.disable_error_handler[] = true + try + with_gap_var("ERROR_OUTPUT", GAP.Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", identity) do + GAP.Globals.TestPackage(GAP.Obj("$pkgname")) + end + end + end + finally + GAP.disable_error_handler[] = false + end + + @test !error_occurred """) end @@ -282,7 +335,7 @@ end # ... function parse_package_infos(fname::String = "package-infos.json") - pkgs = JSON.parsefile("package-infos.json") + pkgs = JSON.parsefile(fname) for name in sort(collect(keys(pkgs))) println("Processing '$name'") pkginfo = pkgs[name]