[Reproducible-builds] [misc] 05/07: test-reproducibility: pass the variation to the command in env var TEST_REPRODUCIBILITY_STAGE

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Aug 31 19:09:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository misc.

commit 7d2cf6c4f0f65bb024fd150220aaad0be1e67f65
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Aug 31 18:32:08 2014 +0000

    test-reproducibility: pass the variation to the command in env var TEST_REPRODUCIBILITY_STAGE
---
 test-reproducibility/test-reproducibility | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test-reproducibility/test-reproducibility b/test-reproducibility/test-reproducibility
index 36ca375..481ec51 100755
--- a/test-reproducibility/test-reproducibility
+++ b/test-reproducibility/test-reproducibility
@@ -41,18 +41,18 @@ else
 fi
 
 run_baseline() {
-	FAKETIME_SAVE_FILE="$FAKETIME_RECORD_FILE" faketime "@+$NOW" $COMMAND
+	FAKETIME_SAVE_FILE="$FAKETIME_RECORD_FILE" TEST_REPRODUCIBILITY_STAGE="baseline" faketime "@+$NOW" $COMMAND
 }
 
 run_different_time() {
-	faketime "tomorrow" $COMMAND
+	TEST_REPRODUCIBILITY_STAGE="timestamps" faketime "tomorrow" $COMMAND
 }
 
 run_different_path() {
 	local parent
 
 	parent="$(dirname "$PWD")"
-	faketime @+$NOW proot -b "$PWD:$parent/different" sh -c "cd $parent/different && $COMMAND"
+	faketime @+$NOW proot -b "$PWD:$parent/different" sh -c "cd $parent/different && TEST_REPRODUCIBILITY_STAGE="build-path" $COMMAND"
 }
 
 run_different_user() {
@@ -60,21 +60,21 @@ run_different_user() {
 
 	new_uid=$(($(id -u) + 1))
 	new_gid=$(($(id -g) + 1))
-	faketime @+$NOW proot -i "$new_uid:$new_gid" $COMMAND
+	TEST_REPRODUCIBILITY_STAGE="usernames" faketime @+$NOW proot -i "$new_uid:$new_gid" $COMMAND
 }
 
 run_different_hostname() {
 	local current_user
 
 	current_user="$(whoami)"
-	sudo unshare --uts -- sh -c "hostname different-hostname && su $current_user -c 'faketime @+$NOW $COMMAND'"
+	sudo unshare --uts -- sh -c "hostname different-hostname && su $current_user -c 'TEST_REPRODUCIBILITY_STAGE=hostname faketime @+$NOW $COMMAND'"
 }
 
 run_different_kernel() {
 	local current_kernel
 
 	current_kernel="$(uname -r)"
-	faketime @+$NOW proot -k "${current_kernel}+different" $COMMAND
+	TEST_REPRODUCIBILITY_STAGE="kernel-version" faketime @+$NOW proot -k "${current_kernel}+different" $COMMAND
 }
 
 (run_baseline > "$TEST_REPRODUCIBILITY_TMPDIR/output-baseline")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-builds mailing list