Skip to content

Commit

Permalink
test_existence.sh: use /usr/include/c++ as test data source
Browse files Browse the repository at this point in the history
We want a deep tree with many files and directories.  dfilemaker1 creates only
a flat tree with all files in one directory.

Instead, copy from /usr/include/c++ which should be reasonably large and
in terms of file count, and have some depth to the tree, on
any installation.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
  • Loading branch information
ofaaland committed Nov 6, 2024
1 parent 8c558a3 commit 0421087
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/tests/test_dsync/test_existence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ DSYNC_SRC_BASE=${DSYNC_SRC_BASE:-${2}}
DSYNC_DEST_BASE=${DSYNC_DEST_BASE:-${3}}
DSYNC_TREE_NAME=${DSYNC_TREE_NAME:-${4}}

DSYNC_TREE_DATA=/usr/include/c++

mpirun=$(which mpirun 2>/dev/null)
mpirun_opts=""
if [[ -n $mpirun ]]; then
Expand All @@ -42,6 +44,7 @@ fi
echo "Using dsync binary at: $DSYNC_TEST_BIN"
echo "Using src parent directory at: $DSYNC_SRC_BASE"
echo "Using dest parent directory at: $DSYNC_DEST_BASE"
echo "Using test data from: $DSYNC_TREE_DATA"

DSYNC_SRC_DIR=$(mktemp --directory ${DSYNC_SRC_BASE}/${DSYNC_TREE_NAME}.XXXXX)
DSYNC_DEST_DIR=$(mktemp --directory ${DSYNC_DEST_BASE}/${DSYNC_TREE_NAME}.XXXXX)
Expand Down Expand Up @@ -154,8 +157,7 @@ rm -fr $DSYNC_SRC_DIR/stuff
rm -fr $DSYNC_DEST_DIR/stuff
mkdir $DSYNC_SRC_DIR/stuff
mkdir $DSYNC_DEST_DIR/stuff
mkdir $DSYNC_DEST_DIR/stuff/destdir
touch $DSYNC_DEST_DIR/stuff/destfile
cp -a $DSYNC_TREE_DATA $DSYNC_DEST_DIR/stuff
sync_and_verify $DSYNC_SRC_DIR/stuff $DSYNC_DEST_DIR/stuff empty_source union

# non-empty source, but empty destination
Expand All @@ -164,8 +166,7 @@ sync_and_verify $DSYNC_SRC_DIR/stuff $DSYNC_DEST_DIR/stuff empty_source union
rm -fr $DSYNC_SRC_DIR/stuff
rm -fr $DSYNC_DEST_DIR/stuff
mkdir $DSYNC_SRC_DIR/stuff
mkdir $DSYNC_SRC_DIR/stuff/adir
touch $DSYNC_SRC_DIR/stuff/afile
cp -a $DSYNC_TREE_DATA $DSYNC_SRC_DIR/stuff
sync_and_verify $DSYNC_SRC_DIR/stuff $DSYNC_DEST_DIR/stuff empty_destination union

# directories on destination, but not source, are removed with --delete
Expand All @@ -174,8 +175,7 @@ rm -fr $DSYNC_SRC_DIR/stuff
rm -fr $DSYNC_DEST_DIR/stuff
mkdir $DSYNC_SRC_DIR/stuff
mkdir $DSYNC_DEST_DIR/stuff
mkdir $DSYNC_SRC_DIR/stuff/insrcdir
touch $DSYNC_SRC_DIR/stuff/insrc
cp -a $DSYNC_TREE_DATA $DSYNC_SRC_DIR/stuff
mkdir $DSYNC_DEST_DIR/stuff/destdir
touch $DSYNC_DEST_DIR/stuff/destfile
sync_and_verify $DSYNC_SRC_DIR/stuff $DSYNC_DEST_DIR/stuff delete src_exactly
Expand Down

0 comments on commit 0421087

Please sign in to comment.