VirtualBox

Changeset 1993 in kBuild for trunk/src/kmk/tests/scripts


Ignore:
Timestamp:
Oct 29, 2008 12:37:51 AM (16 years ago)
Author:
bird
Message:

Merged in current GNU Make code (CVS from 2008-10-28). Ref #55.

Location:
trunk/src/kmk/tests/scripts
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/tests/scripts/features/parallelism

    r1955 r1993  
    7070# for this situation and print a message if it occurred.  This test used
    7171# to trigger this code when I added it but no longer does after the fix.
     72# We have to increase the timeout from the default (5s) on this test.
    7273
    7374run_make_test("
     
    8081
    8182first second: ; \@echo \$\@; $sleep_command 1; echo \$\@",
    82               '-j2', "first\nfirst\nsecond\nsecond");
     83              '-j2', "first\nfirst\nsecond\nsecond", 0, 7);
    8384
    8485# Michael Matz <[email protected]> reported a bug where if make is running in
     
    108109#MAKE#: *** [fail.1] Error 1
    109110The failing command:
    110         @exit 1
     111@exit 1
    111112#MAKE#: *** Waiting for unfinished jobs....
    112113Fail
    113114#MAKE#: *** [fail.2] Error 1
    114115The failing command:
    115         @exit 1
     116@exit 1
    116117Fail
    117118#MAKE#: *** [fail.3] Error 1
    118119The failing command:
    119         @exit 1
     120@exit 1
    120121Ok done',
    121122             512);
     
    138139        @exit 1
    139140', '-j2', '');
     141
     142
     143# TEST #9 -- Savannah bugs 3330 and 15919
     144# In earlier versions of make this will either give the wrong answer, or hang.
     145
     146utouch(-10, 'target');
     147run_make_test('target: intermed ; touch $@
     148
     149.INTERMEDIATE: intermed
     150intermed: | phony ; touch $@
     151
     152.PHONY: phony
     153phony: ; : phony', '-rR -j', ': phony');
     154unlink('target');
    140155
    141156
  • trunk/src/kmk/tests/scripts/functions/eval

    r969 r1993  
    164164
    165165run_make_test('deps: ; $(eval deps: foo)', '',
    166               '#MAKEFILE#:1: *** prerequisites cannot be defined in command scripts.  Stop.',
     166              '#MAKEFILE#:1: *** prerequisites cannot be defined in recipes.  Stop.',
    167167              512);
    168168
  • trunk/src/kmk/tests/scripts/misc/close_stdout

    r969 r1993  
    44
    55if (-e '/dev/full') {
    6   run_make_test('', '-v > /dev/full', '#MAKE#: write error', 256);
     6  run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
    77}
    88
  • trunk/src/kmk/tests/scripts/options/dash-l

    r969 r1993  
    4646$mkoptions .= " -j 4" if ($parallel_jobs);
    4747
    48 &run_make_with_options($makefile, $mkoptions, &get_logfile);
     48# We have to wait longer than the default (5s).
     49&run_make_with_options($makefile, $mkoptions, &get_logfile, 0, 8);
    4950
    5051$slurp = &read_file_into_string (&get_logfile(1));
  • trunk/src/kmk/tests/scripts/targets/INTERMEDIATE

    r1973 r1993  
    5757# TEST #3
    5858# kmk+fast: differs because of different hashing.
     59# kmk: suspect the -j1 actually hides a bug, 'cp bar.f bar.e' is executed twice.
    5960
    60 &run_make_with_options($makefile,'foo.c',&get_logfile);
     61&run_make_with_options($makefile,'-j1 foo.c',&get_logfile);
    6162$answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\n"
    6263        . (!$is_kmk && !$is_fast ? "rm bar.e foo.e\n" : "rm foo.e bar.e\n");
     
    7172# TEST #5
    7273# kmk+fast: differs because of different hashing.
     74# kmk: suspect the -j1 actually hides a bug, 'cp bar.f bar.e' is executed twice.
    7375
    7476&utouch(-10, 'foo.c');
    7577&touch('foo.f');
    7678
    77 &run_make_with_options($makefile,'foo.c',&get_logfile);
     79&run_make_with_options($makefile,'-j1 foo.c',&get_logfile);
    7880$answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\n"
    7981        . (!$is_kmk && !$is_fast ? "rm bar.e foo.e\n" : "rm foo.e bar.e\n");
  • trunk/src/kmk/tests/scripts/targets/SECONDARY

    r969 r1993  
    122122unlink('version2');
    123123
     124# TEST #9 -- Savannah bug #15919
     125# The original fix for this bug caused a new bug, shown here.
     126# kmk: suspect the -j1 actually hides a bug, 'cp 2.a 2.b' is executed twice.
     127
     128touch(qw(1.a 2.a));
     129
     130run_make_test('
     131%.c : %.b ; cp $< $@
     132%.b : %.a ; cp $< $@
     133all : 1.c 2.c', '-rR -j',
     134'cp 1.a 1.b
     135cp 2.a 2.b
     136cp 1.b 1.c
     137cp 2.b 2.c
     138rm 1.b 2.b');
     139
     140unlink(qw(1.a 2.a 1.c 2.c));
     141
     142# TEST #10 -- Savannah bug #15919
     143touch('test.0');
     144run_make_test('
     145.SECONDARY : test.1 test.2 test.3
     146
     147test : test.4
     148
     149%.4 : %.int %.3 ; touch $@
     150
     151%.int : %.3 %.2 ; touch $@
     152
     153%.3 : | %.2 ; touch $@
     154
     155%.2 : %.1 ; touch $@
     156
     157%.1 : %.0 ; touch $@', '-rR -j 2',
     158'touch test.1
     159touch test.2
     160touch test.3
     161touch test.int
     162touch test.4
     163rm test.int');
     164
     165# After a touch of test.0 it should give the same output, except we don't need
     166# to rebuild test.3 (order-only)
     167sleep(1);
     168touch('test.0');
     169run_make_test(undef, '-rR -j 2',
     170'touch test.1
     171touch test.2
     172touch test.int
     173touch test.4
     174rm test.int');
     175
     176# With both test.0 and test.3 updated it should still build everything except
     177# test.3
     178sleep(1);
     179touch('test.0', 'test.3');
     180run_make_test(undef, '-rR -j 2',
     181'touch test.1
     182touch test.2
     183touch test.int
     184touch test.4
     185rm test.int');
     186
     187unlink(qw(test.0 test.1 test.2 test.3 test.4));
     188
    124189# This tells the test driver that the perl test script executed properly.
    1251901;
  • trunk/src/kmk/tests/scripts/variables/special

    r969 r1993  
    5151# &compare_output($answer, &get_logfile(1));
    5252
     53# Test the .RECIPEPREFIX variable
     54&run_make_test('
     55define foo
     56: foo-one \
     57foo-two
     58: foo-three
     59        : foo-four
     60endef
     61
     62orig: ; : orig-one
     63        : orig-two \
     64orig-three \
     65        orig-four \
     66                orig-five \\\\
     67        : orig-six
     68        $(foo)
     69
     70.RECIPEPREFIX = >
     71test: ; : test-one
     72>: test-two \
     73test-three \
     74>test-four \
     75>       test-five \\\\
     76>: test-six
     77>$(foo)
     78
     79.RECIPEPREFIX =
     80reset: ; : reset-one
     81        : reset-two \
     82reset-three \
     83        reset-four \
     84                reset-five \\\\
     85        : reset-six
     86        $(foo)
     87',
     88               'orig test reset',
     89               ': orig-one
     90: orig-two \
     91orig-three \
     92orig-four \
     93        orig-five \\\\
     94: orig-six
     95: foo-one foo-two
     96: foo-three
     97: foo-four
     98: test-one
     99: test-two \
     100test-three \
     101test-four \
     102        test-five \\\\
     103: test-six
     104: foo-one foo-two
     105: foo-three
     106: foo-four
     107: reset-one
     108: reset-two \
     109reset-three \
     110reset-four \
     111        reset-five \\\\
     112: reset-six
     113: foo-one foo-two
     114: foo-three
     115: foo-four');
    53116
    541171;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette