blob: 9e0ec5ea6dbac795551841389824e14d3510c8a8 [file] [log] [blame]
Luigi Santivetti0fdd4702020-06-22 19:00:32 +01001#!/bin/bash
2#
3# module.sh - test2
4#
5# Copyright 2019 Luigi Santivetti <luigi.santivetti@gmail.com>
6
7# Permission is hereby granted, free of charge, to any person obtaining a
8# copy of this software and associated documentation files (the "Software"),
9# to deal in the Software without restriction, including without limitation
10# the rights to use, copy, modify, merge, publish, distribute, sublicense,
11# and/or sell copies of the Software, and to permit persons to whom the
12# Software is furnished to do so, subject to the following conditions:
13
14# The above copyright notice and this permission notice (including the next
15# paragraph) shall be included in all copies or substantial portions of the
16# Software.
17
18# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21# ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
25declare -r module="test2"
26source $common_sh
27
28# Test dependencies. Comment will cause validation to detect that test1 has one
29# unmet dependency on test2.
30module_enable $module
31
32declare -r tmp_d="${mod_rootfs_d}/tmp"
33declare -r test="${module}-testfile.txt"
34declare -r test_f="$tmp_d/$test"
35
36# Test name clash. test1 and test2 both declare a global variable mod_name_clash
37declare -r mod_name_clash="test2_var1_module"
38
39declare -ar mod_more_dirs=( $tmp_d )
40declare -ar mod_more_files=( $test_f )
41declare -ar mod_more_trefs=( test_t )
42
43function tod_watch
44{
45 __watch_module_common || return $s_err
46}
47
48function tod_doins
49{
50 __doins_module_common || return $s_err
51}
52
53function tod_upins
54{
55 __upins_module_common || return $s_err
56}
57
58function tod_clins
59{
60 __clins_module_common || return $s_err
61}