@@ -2780,41 +2780,57 @@ def run_check():
27802780 'url' :
'[email protected] :easybuilders' ,
27812781 'tag' : 'tag_for_tests' ,
27822782 }
2783- git_repo = {
'git_repo' :
'[email protected] :easybuilders/testrepository.git' }
# Just to make the below shorter 2783+ string_args = {
2784+ 'git_repo' :
'[email protected] :easybuilders/testrepository.git' ,
2785+ 'test_prefix' : self .test_prefix ,
2786+ }
2787+
27842788 expected = '\n ' .join ([
27852789 r' running command "git clone --depth 1 --branch tag_for_tests %(git_repo)s"' ,
27862790 r" \(in .*/tmp.*\)" ,
2787- r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"' ,
2791+ r' running command "find testrepository -print0 -path \'*/.git\' -prune | LC_ALL=C sort --zero-terminated'
2792+ r' | GZIP=--no-name tar --create --file %(test_prefix)s/target/test.tar.gz --no-recursion'
2793+ r' --gzip --mtime="1970-01-01 00:00Z" --owner=0 --group=0 --numeric-owner --format=gnu'
2794+ r' --null --no-recursion --files-from -"' ,
27882795 r" \(in .*/tmp.*\)" ,
2789- ]) % git_repo
2796+ ]) % string_args
27902797 run_check ()
27912798
27922799 git_config ['clone_into' ] = 'test123'
27932800 expected = '\n ' .join ([
27942801 r' running command "git clone --depth 1 --branch tag_for_tests %(git_repo)s test123"' ,
27952802 r" \(in .*/tmp.*\)" ,
2796- r' running command "tar cfvz .*/target/test.tar.gz --exclude .git test123"' ,
2803+ r' running command "find test123 -print0 -path \'*/.git\' -prune | LC_ALL=C sort --zero-terminated'
2804+ r' | GZIP=--no-name tar --create --file #(test_fprefix)s/target/test.tar.gz --no-recursion'
2805+ r' --gzip --mtime="1970-01-01 00:00Z" --owner=0 --group=0 --numeric-owner --format=gnu'
2806+ r' --null --no-recursion --files-from -"' ,
27972807 r" \(in .*/tmp.*\)" ,
2798- ]) % git_repo
2808+ ]) % string_args
27992809 run_check ()
28002810 del git_config ['clone_into' ]
28012811
28022812 git_config ['recursive' ] = True
28032813 expected = '\n ' .join ([
28042814 r' running command "git clone --depth 1 --branch tag_for_tests --recursive %(git_repo)s"' ,
28052815 r" \(in .*/tmp.*\)" ,
2806- r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"' ,
2816+ r' running command "find testrepository -print0 -path \'*/.git\' -prune | LC_ALL=C sort --zero-terminated'
2817+ r' | GZIP=--no-name tar --create --file #(test_fprefix)s/target/test.tar.gz --no-recursion'
2818+ r' --gzip --mtime="1970-01-01 00:00Z" --owner=0 --group=0 --numeric-owner --format=gnu'
2819+ r' --null --no-recursion --files-from -"' ,
28072820 r" \(in .*/tmp.*\)" ,
2808- ]) % git_repo
2821+ ]) % string_args
28092822 run_check ()
28102823
28112824 git_config ['keep_git_dir' ] = True
28122825 expected = '\n ' .join ([
28132826 r' running command "git clone --branch tag_for_tests --recursive %(git_repo)s"' ,
28142827 r" \(in .*/tmp.*\)" ,
2815- r' running command "tar cfvz .*/target/test.tar.gz testrepository"' ,
2828+ r' running command "find testrepository -print0 | LC_ALL=C sort --zero-terminated | GZIP=--no-name tar'
2829+ r' --create --file #(test_fprefix)s/target/test.tar.gz --no-recursion --gzip'
2830+ r' --mtime="1970-01-01 00:00Z" --owner=0 --group=0 --numeric-owner --format=gnu --null --no-recursion'
2831+ r' --files-from -"' ,
28162832 r" \(in .*/tmp.*\)" ,
2817- ]) % git_repo
2833+ ]) % string_args
28182834 run_check ()
28192835 del git_config ['keep_git_dir' ]
28202836
@@ -2825,9 +2841,12 @@ def run_check():
28252841 r" \(in .*/tmp.*\)" ,
28262842 r' running command "git checkout 8456f86 && git submodule update --init --recursive"' ,
28272843 r" \(in testrepository\)" ,
2828- r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"' ,
2844+ r' running command "find testrepository -print0 -path \'*/.git\' -prune | LC_ALL=C sort --zero-terminated'
2845+ r' | GZIP=--no-name tar --create --file #(test_fprefix)s/target/test.tar.gz --no-recursion'
2846+ r' --gzip --mtime="1970-01-01 00:00Z" --owner=0 --group=0 --numeric-owner --format=gnu'
2847+ r' --null --no-recursion --files-from -"' ,
28292848 r" \(in .*/tmp.*\)" ,
2830- ]) % git_repo
2849+ ]) % string_args
28312850 run_check ()
28322851
28332852 del git_config ['recursive' ]
@@ -2836,9 +2855,12 @@ def run_check():
28362855 r" \(in .*/tmp.*\)" ,
28372856 r' running command "git checkout 8456f86"' ,
28382857 r" \(in testrepository\)" ,
2839- r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"' ,
2858+ r' running command "find testrepository -print0 -path \'*/.git\' -prune | LC_ALL=C sort --zero-terminated'
2859+ r' | GZIP=--no-name tar --create --file #(test_fprefix)s/target/test.tar.gz --no-recursion'
2860+ r' --gzip --mtime="1970-01-01 00:00Z" --owner=0 --group=0 --numeric-owner --format=gnu'
2861+ r' --null --no-recursion --files-from -"' ,
28402862 r" \(in .*/tmp.*\)" ,
2841- ]) % git_repo
2863+ ]) % string_args
28422864 run_check ()
28432865
28442866 # Test with real data.
0 commit comments