File: 2005_08_31_build_cache_pop_options.test

package info (click to toggle)
makepp 2.0.98.5-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,744 kB
  • sloc: perl: 15,893; makefile: 38; javascript: 25; sh: 1
file content (85 lines) | stat: -rw-r--r-- 1,782 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
###	SPAR <http://www.cpan.org/scripts/>
###	61	664	1164313904	1125528381	makepp_test_script.pl
# Create the build cache:
makepp \'builtin', qw{-MMpp::BuildCacheControl create ./build_cache};

sub clean {			# Utility to save calling makepp
  unlink qw(my_true sort sort.o), <sort*_build_record .makepp/*>;
  rmdir '.makepp';
}

#----- Test 1
# Now build targets, but don't populate BC
makepp qw{--build-cache build_cache --nopopulate-bc};

clean;

# This should run the rule again
makepp qw{--build-cache build_cache --nopopulate-bc};

-f 'sort_build_record' || die 1;
-f 'sort.o_build_record' || die 2;

#----- Test 2
clean;

# Now build targets normally
makepp qw{--build-cache build_cache};

clean;

# This should copy from BC
makepp qw{--build-cache build_cache --nopopulate-bc --force-copy-from-bc};

-f 'sort_build_record' && die 3;
-f 'sort.o_build_record' && die 4;

#----- Test 3
clean;

# This should run the rule yet again
makepp qw{--build-cache build_cache --populate-bc-only};

-f 'sort_build_record' || die 5;
-f 'sort.o_build_record' || die 6;

#----- Test 4
clean;

# Clean the BC
makepp \'builtin', qw{-MMpp::BuildCacheControl clean --mtime +-1 ./build_cache};

# This should run the rule yet again
makepp qw{--build-cache build_cache --populate-bc-only};

clean;

# This should copy from BC
makepp qw{--build-cache build_cache};

-f 'sort_build_record' && die 7;
-f 'sort.o_build_record' && die 8;

1
###	21	664	1164313913	1209736023	Makeppfile
$(phony all): sort run

sort: sort.o
	&touch $@
	&echo $@ -o $@_build_record

sort.o:
	&touch $@
	&echo $@ -o $@_build_record

$(phony run): my_true
	.$/$<

my_true:
    ifperl Mpp::is_windows < 2
	&echo -o $@ "#!/bin/sh"
	&chmod 755 $@
    else
	&touch $@
	&echo -o $@.bat "@echo"	# Not a clean dep-chain...
    endif