File: 2005_07_12_build_cache_cp.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 (46 lines) | stat: -rw-r--r-- 1,493 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
###	SPAR <http://www.cpan.org/scripts/>
###	1	644	1329052295	1329052295	is_relevant.pl
have_cc
###	29	755	1164320845	1342865499	makepp_test_script.pl
makepp \'builtin', qw(-MMpp::BuildCacheControl create build_cache);

# Populate the cache
makepp '--build-cache=build_cache', '--force-copy-from-bc', '--stop-on-race';
n_files 'n1';

# Now get a new foo.o with an update timestamp.  If it works properly, then
# the foo executable will still come from the cache, because it uses an MD5 of
# foo.o in its cache key instead of the timestamp.
wait_timestamp grep -e, qw(foo.o foo.obj);
unlink qw(foo.o foo.obj) or die "Can't unlink foo.o or foo.obj";
makepp '--build-cache=build_cache', '--force-copy-from-bc', '--stop-on-race';
n_files 'n2';

# Make sure that the DEP_SIGS in the 'foo' executable build info was updated,
# so that it ooks up-to-date even though the foo.o timestamp is different from
# the DEP_SIGS in the build cache.
makepp;

die unless -d 'build_cache/incoming.dir';
my @garbage = glob 'build_cache/incoming.dir/*';
die "@garbage" if @garbage;

if( is_windows ) {
  for my $n ( qw(1 2 _files) ) {
    c_sed 's/ 1 / 2 /', "-o+<answers/n$n";
  }
}
1;
###	1	644	1145710484	1121190843	RootMakeppfile
$(phony default): foo
###	3	644	1121191772	1121188739	foo.c
int main() {
    return 0;
}
###	D	755	1121192534	1121189776	answers
###	1	644	1121189769	1121189769	answers/n1
2 1 0
###	1	644	1121189776	1121189776	answers/n2
0 1 0
###	1	644	1121189769	1190055935	answers/n_files
0 1 0