Skip to content

Commit

Permalink
[CI] Run regression tests for different parallelizations in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmlnkn committed Apr 6, 2024
1 parent 3a85777 commit 4c39952
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
parallelization: [0, 1, 2]

steps:
- uses: actions/download-artifact@v3
Expand Down Expand Up @@ -66,5 +67,12 @@ jobs:
- name: Regression Tests
run: |
export RATARMOUNT_CMD=/usr/local/bin/ratarmount
# Starting up ratarmount for each very short test is quite slow, especially on the CI machine (3-5s).
# On my local machine, it's around 1s, which is not good, but also not bad.
# The AppImage extraction script is already tested in the simple tests above, so it should be fine
# to extract it once and then test the AppRun script, which still modifies the LD_LIBRARY_PATH and
# still uses the bundled libaries, i.e., it still is a good integrity test for the AppImage.
/usr/local/bin/ratarmount --appimage-extract
export RATARMOUNT_CMD=$PWD/squashfs-root/AppRun
export PARALLELIZATIONS=${{ matrix.parallelization }}
bash tests/runtests.sh
3 changes: 2 additions & 1 deletion AppImage/build-ratarmount-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ trimAppImage

echo "Create AppImage from Modified AppDir"
# times and sizes for ratarmount.AppImage --help on T14: --comp gzip: 1.6s, 12.50 MB, --comp xz: 3.0s, 12.88 MB
APPIMAGE_EXTRACT_AND_RUN=1 ARCH="$APPIMAGE_ARCH" appimagetool --comp gzip --no-appstream "$APP_BASE".App{Dir,Image}
# times and sizes for ratarmount.AppImage --help on Ryzen 3900X: --comp gzip: 1.2s, 15.09 MB, --comp xz: 2.2s, 14.59 MB
APPIMAGE_EXTRACT_AND_RUN=1 ARCH="$APPIMAGE_ARCH" appimagetool --comp xz --no-appstream "$APP_BASE".App{Dir,Image}

chmod u+x "$APP_BASE.AppImage"
version=$( ./"$APP_BASE.AppImage" --version | sed -n -E 's|ratarmount ([0-9.]+)|\1|p' &>/dev/null )
Expand Down
5 changes: 4 additions & 1 deletion tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ RATARMOUNT_CMD="$RATARMOUNT_CMD --index-minimum-file-count 0"
export RATARMOUNT_CMD
echo "RATARMOUNT_CMD: $RATARMOUNT_CMD"

if [[ -z "$PARALLELIZATIONS" ]]; then
PARALLELIZATIONS="1 2 0"
fi

# MAC does not have mountpoint check!
if ! command -v mountpoint &>/dev/null; then
Expand Down Expand Up @@ -1890,7 +1893,7 @@ pytestedTests+=(
)


for parallelization in 1 2 0; do
for parallelization in $PARALLELIZATIONS; do

echo "== Testing with -P $parallelization =="
export parallelization
Expand Down

0 comments on commit 4c39952

Please sign in to comment.