1# 2# Makefile for Bareos regression testing 3# 4# Before running, you must create a file named config containing 5# the configuration parameters. Create it by doing: 6# 7# cp prototype.conf config 8# 9# Then edit config and set the value for what are appropriate for you. 10# 11 12nothing: 13 14setup: prepare bareos sed 15 16# 17# Some machines cannot handle the sticky bit and other garbage that 18# is in weird-files, so we load and run it only on Linux machines. 19# 20bareos: prepare 21 echo "Doing: scripts/setup" 22 scripts/setup 23 24prepare: 25 @rm -rf weird-files 26 # ignore errors 27 tar -xzf weird-files.tar.gz || true 28 @rm -rf tmp working dumps 29 mkdir tmp working dumps 30 31sed: 32 echo "Doing: scripts/do_sed" 33 scripts/do_sed 34 35# Run all disk tests 36test: 37 ./all-disk-tests 38 39# run all tape and disk tests 40full_test: 41 ./all-tape-and-disk-tests 42 43# These tests require you to run as root 44root_test: 45 ./all-root-tests 46 47DEST = $(DESTDIR)/var/lib/bareos/bareos-regress 48install: 49 mkdir -p $(DEST) 50 # directories 51 rsync -a configs $(DEST) 52 rsync -a data $(DEST) 53 rsync -a scripts $(DEST) 54 rsync -a tests $(DEST) 55 # files 56 rsync -a \ 57 CTestCustom.cmake \ 58 DartConfiguration.tcl* DartTestfile.txt* \ 59 Makefile all-* \ 60 debug do_* \ 61 encrypt-* endtime experimental-* \ 62 make-ctest-adds misc-tests \ 63 nightly-* prototype.conf \ 64 rtest run* \ 65 startover_libdbi.sh starttime tape \ 66 weird-files.tar.gz \ 67 $(DEST) 68 mkdir -p $(DEST)/bin 69 mkdir -p $(DEST)/dumps 70 mkdir -p $(DEST)/tmp 71 mkdir -p $(DEST)/working 72 73clean: 74 rm -Rf build 75 rm -Rf build-webui 76 rm -Rf CMakeFiles 77 rm -f tmp/file-list 78 rm -fr tmp/* working/* dumps/* Testing 79 rm -f test.out 80 rm -f diff 81 rm -f 1 2 3 scripts/1 scripts/2 scripts/3 tests/1 tests/2 tests/3 82 find . -name .#* -exec rm -rf {} \; 83 scripts/cleanup 84 85# Reset our userid after running as root 86reset: 87 chown -R ${USER}:${USER} . tmp working 88 scripts/cleanup 89 rm -f tmp/* working/* 90 91distclean: clean 92 rm -rf bin build weird-files weird-files weird-files2 tmp working 93 rm -f scripts/*.conf 94