|
82 | 82 | exit 1 |
83 | 83 | else |
84 | 84 | echo "All packages were built succesfully" |
| 85 | + |
| 86 | + # |
| 87 | + # Now that we built packages, we try to load them. |
| 88 | + # For this, we need to skip a few additional packages which cannot |
| 89 | + # be loaded in the test environment. |
| 90 | + # |
| 91 | + # skip xgap as it can only be loaded in a GAP session started via |
| 92 | + # special helper script, *and* it requires X Window |
| 93 | + rm -rf xgap* |
| 94 | + # also skip itc because it requires xgap |
| 95 | + rm -rf itc* |
| 96 | + |
| 97 | + if [[ x"$ABI" != "x32" ]] |
| 98 | + then |
| 99 | + # HACK: disable some packages in 64bit mode for now. Otherwise they |
| 100 | + # builds, but loading fails with an "undefined symbol: atexit" error |
| 101 | + rm -rf digraphs* |
| 102 | + rm -rf float* |
| 103 | + fi |
| 104 | + |
| 105 | + cd .. |
| 106 | + # Load GAP (without packages) and save workspace to speed up test. |
| 107 | + # Also, save names of all packages into a file to be able to iterate over them |
| 108 | + $GAP -b <<GAPInput |
| 109 | + SaveWorkspace("testpackagesload.wsp"); |
| 110 | + PrintTo("packagenames", JoinStringsWithSeparator( SortedList(RecNames( GAPInfo.PackagesInfo )),"\n") ); |
| 111 | + QUIT_GAP(0); |
| 112 | +GAPInput |
| 113 | + for pkg in $(cat packagenames) |
| 114 | + do |
| 115 | + $GAP -q -L testpackagesload.wsp <<GAPInput |
| 116 | + Print("-----------------------------------------------------\n"); |
| 117 | + Print("Loading $pkg ... \n"); |
| 118 | + if LoadPackage("$pkg",false) = true then |
| 119 | + Print("PASS: $pkg\n"); |
| 120 | + else |
| 121 | + Print("FAIL: $pkg\n"); |
| 122 | + AppendTo("fail.log", "Loading failed : ", "$pkg", "\n"); |
| 123 | + fi; |
| 124 | +GAPInput |
| 125 | + |
| 126 | + done |
| 127 | + |
| 128 | + if [[ -f fail.log ]] |
| 129 | + then |
| 130 | + echo "Some packages failed to load:" |
| 131 | + cat fail.log |
| 132 | + exit 1 |
| 133 | + fi |
| 134 | + |
85 | 135 | fi |
86 | 136 |
|
87 | 137 | # TODO: actually run package tests |
|
0 commit comments