3 NOOP
= $(SHELL
) -c true
12 # some of these are pretty questionable.
15 TEST_FILES
= database_dependent.pl
17 RUN_EXPENSIVE_TESTS
= 0
18 PROVE
= /usr
/bin
/prove
21 KOHA_CONF_DIR
= ..
/etc
22 CONF_FILE_TEMPLATE
= $(KOHA_CONF_DIR
)/koha-conf.xml
23 TEST_CONF_FILE
= run
/etc
/koha-conf.xml
24 MKPATH
= $(PERL
) "-MExtUtils::Command" -e mkpath
26 TEST_REWRITE_SCRIPT
= rewrite-config-test.PL
27 REAL_REWRITE_SCRIPT
= ..
/rewrite-config.PL
29 ZEBRA_CONF_DIR
= run
/etc
/zebradb
30 ZEBRA_CONF_FILES
= $(ZEBRA_CONF_DIR
)/etc
/passwd
$(ZEBRA_CONF_DIR
)/zebra-biblios.cfg
$(ZEBRA_CONF_DIR
)/zebra-authorities.cfg
$(ZEBRA_CONF_DIR
)/zebra-authorities-dom.cfg
$(ZEBRA_CONF_DIR
)/explain-authorities.xml
$(ZEBRA_CONF_DIR
)/explain-biblios.xml
$(ZEBRA_CONF_DIR
)/retrieval-info-auth-grs1.xml
$(ZEBRA_CONF_DIR
)/retrieval-info-auth-dom.xml
$(ZEBRA_CONF_DIR
)/ccl.properties
$(ZEBRA_CONF_DIR
)/cql.properties
$(ZEBRA_CONF_DIR
)/pqf.properties
32 SCRIPTS
= koha-zebra-ctl.sh koha-pazpar2-ctl.sh koha-index-daemon-ctl.sh
33 SRC_SCRIPT_DIR
= ..
/misc
/bin
34 TEST_SCRIPT_DIR
= run
/bin
36 SMOLDER_SERVER
= 72.232.235.42:8000
37 SMOLDER_REPORT_FILENAME
= kohatests.txt
38 SMOLDER_REPORT_TARBALL
= kohatests.
tar.gz
39 SMOLDER_PROJECT_NAME
= Koha
40 SMOLDER_SMOKE_SIGNAL
= .
/smolder_smoke_signal
43 $(NOECHO
) $(ECHO
) RUNNING THIS MAKEFILE MAY CAUSE LOSS OF DATA
45 $(NOECHO
) $(ECHO
) This makefile is completely beta.
46 $(NOECHO
) $(ECHO
) Please read it first and edit the variables at the top.
47 $(NOECHO
) $(ECHO
) Then
, you can run
\'make
test\'
49 config_file
:: $(CONF_FILE_TEMPLATE
) test_run_dirs
50 $(CP
) $(CONF_FILE_TEMPLATE
) $(TEST_CONF_FILE
)
51 $(PERL
) $(TEST_REWRITE_SCRIPT
) --file
$(TEST_CONF_FILE
)
52 $(PERL
) $(REAL_REWRITE_SCRIPT
) $(TEST_CONF_FILE
)
54 zebra_conf_files
:: test_run_dirs
$(ZEBRA_CONF_FILES
)
57 $(ZEBRA_CONF_FILES
) ::
58 $(PERL
) $(TEST_REWRITE_SCRIPT
) --file
$@
59 $(PERL
) $(REAL_REWRITE_SCRIPT
) $@
62 $(SED
) s
/--user
=\
$$USER.\
$$GROUP// $(SRC_SCRIPT_DIR
)/$@
> $(TEST_SCRIPT_DIR
)/$@
63 $(PERL
) $(TEST_REWRITE_SCRIPT
) --file
$(TEST_SCRIPT_DIR
)/$@
64 $(PERL
) $(REAL_REWRITE_SCRIPT
) $(TEST_SCRIPT_DIR
)/$@
65 $(CHMOD
) 755 $(TEST_SCRIPT_DIR
)/$@
67 test :: config_file
$(ZEBRA_CONF_FILES
) $(SCRIPTS
)
68 KOHA_CONF
=$(TEST_CONF_FILE
) PERL5LIB
=$(PERL5LIB
) TEST_CLASS
=$(TEST_CLASS
) RUN_EXPENSIVE_TESTS
=$(RUN_EXPENSIVE_TESTS
) \
69 $(PROVE
) $(PROVE_FLAGS
) $(TEST_FILES
)
71 test-single
:: config_file
$(ZEBRA_CONF_FILES
) $(SCRIPTS
)
72 KOHA_CONF
=$(TEST_CONF_FILE
) PERL5LIB
=$(PERL5LIB
) RUN_EXPENSIVE_TESTS
=1 SINGLE_TEST
=1 \
73 $(PROVE
) $(PROVE_FLAGS
) -Ilib
$(TEST_FILES
)
75 fulltest
:: RUN_EXPENSIVE_TESTS
= 1
80 $(CP
) -a ..
/etc
/zebradb run
/etc
81 $(MKPATH
) run
/etc
/zebradb
/etc
82 $(MKPATH
) run
/var
/lib
/zebradb
/biblios
/key
83 $(MKPATH
) run
/var
/lib
/zebradb
/biblios
/register
84 $(MKPATH
) run
/var
/lib
/zebradb
/biblios
/shadow
85 $(MKPATH
) run
/var
/lib
/zebradb
/biblios
/tmp
86 $(MKPATH
) run
/var
/lib
/zebradb
/authorities
/key
87 $(MKPATH
) run
/var
/lib
/zebradb
/authorities
/register
88 $(MKPATH
) run
/var
/lib
/zebradb
/authorities
/shadow
89 $(MKPATH
) run
/var
/lib
/zebradb
/authorities
/tmp
90 $(MKPATH
) run
/var
/lock
/zebradb
/biblios
91 $(MKPATH
) run
/var
/lock
/zebradb
/authorities
92 $(MKPATH
) run
/var
/run
/zebradb
93 $(MKPATH
) run
/var
/log
/zebradb
96 submit_report
:: $(SMOLDER_REPORT_TARBALL
)
97 $(SMOLDER_SMOKE_SIGNAL
) --server
$(SMOLDER_SERVER
) --file
$(SMOLDER_REPORT_TARBALL
) --project
$(SMOLDER_PROJECT_NAME
) --anonymous
98 # $(RM) $(SMOLDER_REPORT_TARBALL)
100 submit
:: submit_report
102 $(SMOLDER_REPORT_TARBALL
) :: $(SMOLDER_REPORT_FILENAME
)
103 tar zcvf
$(SMOLDER_REPORT_TARBALL
) kohatests.txt
104 $(RM
) $(SMOLDER_REPORT_FILENAME
)
106 $(SMOLDER_REPORT_FILENAME
) :: report
108 report
:: config_file
$(ZEBRA_CONF_FILES
) $(SCRIPTS
)
109 -KOHA_CONF
=$(TEST_CONF_FILE
) PERL5LIB
=$(PERL5LIB
) TEST_CLASS
=$(TEST_CLASS
) RUN_EXPENSIVE_TESTS
=$(RUN_EXPENSIVE_TESTS
) \
110 $(PERL
) $(TEST_FILES
) > $(SMOLDER_REPORT_FILENAME
)