2 # These are some common functions used to test libguestfs.
4 function pick_project ()
6 # Try to guess which project this patch series is for.
7 # You should put [PATCH hivex ...] or [PATCH supermin ...]
9 subject="$(grep -i -m1 '^Subject: ' $1)"
11 if [[ "$subject" =~ \[PATCH.*hivex.*\] ]]; then
13 elif [[ "$subject" =~ \[PATCH.*supermin.*\] ]]; then
15 elif [[ "$subject" =~ \[PATCH.*nbdkit.*\] ]]; then
18 url=https://github.com/libguestfs/$project
21 function checkout_sources ()
24 echo "Checking out sources from $url ..."
27 # Save network by using the local copy if it exists.
28 if [ -d $HOME/d/$project ]; then
29 cp -a $HOME/d/$project .
31 git checkout -f master
40 # Try to apply the patches.
41 function apply_patches ()
44 echo "Applying patches ..."
52 # Set up localconfigure and localenv appropriately.
53 function local_config ()
58 cat > localconfigure <<'EOF'
68 cat > localenv <<'EOF'
69 export SKIP_TEST_PARALLEL_MOUNT_LOCAL=1
70 export SKIP_TEST_FUSE_UMOUNT_RACE_SH=1
71 export SKIP_TEST_GUESTMOUNT_FD=1
72 export SKIP_TEST_XFS_ADMIN=1
73 export SKIP_TEST_XFS_MISC_PL=1
74 export SKIP_TEST_SYSLINUX_PL=1
79 cat > localconfigure <<'EOF'
88 cat > localconfigure <<'EOF'
97 cat > localconfigure <<'EOF'
100 --libdir /usr/lib64 \
101 --enable-gcc-warnings \
106 chmod +x localconfigure