1# Copyright 2011 The Kyua Authors. 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: 7# 8# * Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the 12# documentation and/or other materials provided with the distribution. 13# * Neither the name of Google Inc. nor the names of its contributors 14# may be used to endorse or promote products derived from this software 15# without specific prior written permission. 16# 17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29if WITH_ATF 30tests_integrationdir = $(pkgtestsdir)/integration 31 32tests_integration_DATA = integration/Kyuafile 33EXTRA_DIST += $(tests_integration_DATA) 34 35ATF_SH_BUILD = \ 36 $(MKDIR_P) integration; \ 37 echo "\#! $(ATF_SH)" >integration/$${name}; \ 38 echo "\# AUTOMATICALLY GENERATED FROM Makefile" >>integration/$${name}; \ 39 if [ -n "$${substs}" ]; then \ 40 cat $(srcdir)/integration/utils.sh $(srcdir)/integration/$${name}.sh \ 41 | sed "$${substs}" >>integration/$${name}; \ 42 else \ 43 cat $(srcdir)/integration/utils.sh $(srcdir)/integration/$${name}.sh \ 44 >>integration/$${name}; \ 45 fi; \ 46 chmod +x integration/$${name} 47 48ATF_SH_DEPS = \ 49 $(srcdir)/integration/utils.sh \ 50 Makefile 51 52EXTRA_DIST += integration/utils.sh 53 54tests_integration_SCRIPTS = integration/cmd_about_test 55CLEANFILES += integration/cmd_about_test 56EXTRA_DIST += integration/cmd_about_test.sh 57integration/cmd_about_test: $(srcdir)/integration/cmd_about_test.sh \ 58 $(ATF_SH_DEPS) 59 $(AM_V_GEN)name="cmd_about_test"; \ 60 substs='s,__KYUA_DOCDIR__,$(docdir),g'; \ 61 $(ATF_SH_BUILD) 62 63tests_integration_SCRIPTS += integration/cmd_config_test 64CLEANFILES += integration/cmd_config_test 65EXTRA_DIST += integration/cmd_config_test.sh 66integration/cmd_config_test: $(srcdir)/integration/cmd_config_test.sh \ 67 $(ATF_SH_DEPS) 68 $(AM_V_GEN)name="cmd_config_test"; \ 69 $(ATF_SH_BUILD) 70 71tests_integration_SCRIPTS += integration/cmd_db_exec_test 72CLEANFILES += integration/cmd_db_exec_test 73EXTRA_DIST += integration/cmd_db_exec_test.sh 74integration/cmd_db_exec_test: $(srcdir)/integration/cmd_db_exec_test.sh \ 75 $(ATF_SH_DEPS) 76 $(AM_V_GEN)name="cmd_db_exec_test"; \ 77 $(ATF_SH_BUILD) 78 79tests_integration_SCRIPTS += integration/cmd_db_migrate_test 80CLEANFILES += integration/cmd_db_migrate_test 81EXTRA_DIST += integration/cmd_db_migrate_test.sh 82integration/cmd_db_migrate_test: $(srcdir)/integration/cmd_db_migrate_test.sh \ 83 $(ATF_SH_DEPS) 84 $(AM_V_GEN)name="cmd_db_migrate_test"; \ 85 substs='s,__KYUA_STOREDIR__,$(storedir),g'; \ 86 substs="$${substs};s,__KYUA_STORETESTDATADIR__,$(tests_storedir),g"; \ 87 $(ATF_SH_BUILD) 88 89tests_integration_SCRIPTS += integration/cmd_debug_test 90CLEANFILES += integration/cmd_debug_test 91EXTRA_DIST += integration/cmd_debug_test.sh 92integration/cmd_debug_test: $(srcdir)/integration/cmd_debug_test.sh \ 93 $(ATF_SH_DEPS) 94 $(AM_V_GEN)name="cmd_debug_test"; \ 95 $(ATF_SH_BUILD) 96 97tests_integration_SCRIPTS += integration/cmd_help_test 98CLEANFILES += integration/cmd_help_test 99EXTRA_DIST += integration/cmd_help_test.sh 100integration/cmd_help_test: $(srcdir)/integration/cmd_help_test.sh $(ATF_SH_DEPS) 101 $(AM_V_GEN)name="cmd_help_test"; \ 102 $(ATF_SH_BUILD) 103 104tests_integration_SCRIPTS += integration/cmd_list_test 105CLEANFILES += integration/cmd_list_test 106EXTRA_DIST += integration/cmd_list_test.sh 107integration/cmd_list_test: $(srcdir)/integration/cmd_list_test.sh $(ATF_SH_DEPS) 108 $(AM_V_GEN)name="cmd_list_test"; \ 109 $(ATF_SH_BUILD) 110 111tests_integration_SCRIPTS += integration/cmd_report_test 112CLEANFILES += integration/cmd_report_test 113EXTRA_DIST += integration/cmd_report_test.sh 114integration/cmd_report_test: $(srcdir)/integration/cmd_report_test.sh \ 115 $(ATF_SH_DEPS) 116 $(AM_V_GEN)name="cmd_report_test"; \ 117 $(ATF_SH_BUILD) 118 119tests_integration_SCRIPTS += integration/cmd_report_html_test 120CLEANFILES += integration/cmd_report_html_test 121EXTRA_DIST += integration/cmd_report_html_test.sh 122integration/cmd_report_html_test: \ 123 $(srcdir)/integration/cmd_report_html_test.sh $(ATF_SH_DEPS) 124 $(AM_V_GEN)name="cmd_report_html_test"; \ 125 $(ATF_SH_BUILD) 126 127tests_integration_SCRIPTS += integration/cmd_report_junit_test 128CLEANFILES += integration/cmd_report_junit_test 129EXTRA_DIST += integration/cmd_report_junit_test.sh 130integration/cmd_report_junit_test: \ 131 $(srcdir)/integration/cmd_report_junit_test.sh $(ATF_SH_DEPS) 132 $(AM_V_GEN)name="cmd_report_junit_test"; \ 133 $(ATF_SH_BUILD) 134 135tests_integration_SCRIPTS += integration/cmd_test_test 136CLEANFILES += integration/cmd_test_test 137EXTRA_DIST += integration/cmd_test_test.sh 138integration/cmd_test_test: $(srcdir)/integration/cmd_test_test.sh $(ATF_SH_DEPS) 139 $(AM_V_GEN)name="cmd_test_test"; \ 140 $(ATF_SH_BUILD) 141 142tests_integration_SCRIPTS += integration/global_test 143CLEANFILES += integration/global_test 144EXTRA_DIST += integration/global_test.sh 145integration/global_test: $(srcdir)/integration/global_test.sh $(ATF_SH_DEPS) 146 $(AM_V_GEN)name="global_test"; \ 147 $(ATF_SH_BUILD) 148endif 149 150include integration/helpers/Makefile.am.inc 151