diff options
author | Theodore Ts'o <tytso@mit.edu> | 2022-11-26 14:42:09 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-11-26 14:53:02 -0500 |
commit | facad14d5c6e4c519254d669615b8fe07c007603 (patch) | |
tree | 7106d4b5f348217a902d4356208c6da1227e1f97 | |
parent | da33ab6c9dff3b51a34b0fe79564d8190e5f3b86 (diff) | |
download | xfstests-bld-facad14d5c6e4c519254d669615b8fe07c007603.tar.gz |
gce-create-image: add support for the "--datecode" option
This allows the datecode used in the image name to be specified via a
command line option. Also allow the datecode to be passed through via
the ./build-appliance script.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-x | build-appliance | 12 | ||||
-rwxr-xr-x | test-appliance/gce-create-image | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/build-appliance b/build-appliance index 99c788ed..aa655c47 100755 --- a/build-appliance +++ b/build-appliance @@ -8,6 +8,7 @@ set -e -u gen_image_args= OUT_TAR= +DATECODE= BUILD_ENV= SUDO_ENV=sudo DO_GCE= @@ -48,6 +49,7 @@ longopts+=",out-tar" longopts+=",no-out-tar" longopts+=",update" longopts+=",gce" +longopts+=",datecode:" if ! options=$(getopt -o "" -l "$longopts" -- "$@"); then usage 1>&2 @@ -79,6 +81,9 @@ while (( $# >= 0 )); do --gce) DO_GCE=yes ;; + --datecode) shift + DATECODE="$1" + ;; --) shift break @@ -117,7 +122,12 @@ esac cd ../run-fstests if test -n "$DO_GCE"; then - ./gce-xfstests create-image --arch=$ARCH >& /tmp/gce-xfstests-create.$$ & + d= + if test -n "$DATECODE" ; then + d="--datecode $DATECODE" + fi + ./gce-xfstests create-image --arch=$ARCH $d \ + >& /tmp/gce-xfstests-create.$$ & fi cd ../test-appliance diff --git a/test-appliance/gce-create-image b/test-appliance/gce-create-image index fcef4537..da37a3ce 100755 --- a/test-appliance/gce-create-image +++ b/test-appliance/gce-create-image @@ -49,6 +49,9 @@ while [ "$1" != "" ]; do --arch=*) ARCH=$(echo "$1" | sed 's/--arch=//') ;; + --datecode) shift + DATECODE="$1" + ;; *) echo "usage: gce-create-image [--arch ARCH]" exit 1 |