summaryrefslogtreecommitdiffstats
path: root/src/rocksdb/tools/rocksdb_dump_test.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/rocksdb/tools/rocksdb_dump_test.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rocksdb/tools/rocksdb_dump_test.sh b/src/rocksdb/tools/rocksdb_dump_test.sh
new file mode 100755
index 00000000..8d9c7f52
--- /dev/null
+++ b/src/rocksdb/tools/rocksdb_dump_test.sh
@@ -0,0 +1,8 @@
+# shellcheck disable=SC2148
+TESTDIR=`mktemp -d ${TMPDIR:-/tmp}/rocksdb-dump-test.XXXXX`
+DUMPFILE="tools/sample-dump.dmp"
+
+# Verify that the sample dump file is undumpable and then redumpable.
+./rocksdb_undump --dump_location=$DUMPFILE --db_path=$TESTDIR/db
+./rocksdb_dump --anonymous --db_path=$TESTDIR/db --dump_location=$TESTDIR/dump
+cmp $DUMPFILE $TESTDIR/dump