From ce35f8ec56ec7e89d351cd95001f4d819c97e07d Mon Sep 17 00:00:00 2001 From: danakj Date: Thu, 22 Jul 2021 14:52:45 -0400 Subject: remap-cwd-prefix --- .../run-make-fulldeps/reproducible-build/Makefile | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/test') diff --git a/src/test/run-make-fulldeps/reproducible-build/Makefile b/src/test/run-make-fulldeps/reproducible-build/Makefile index a17ec212cfd..762cf5ed2ea 100644 --- a/src/test/run-make-fulldeps/reproducible-build/Makefile +++ b/src/test/run-make-fulldeps/reproducible-build/Makefile @@ -10,6 +10,9 @@ all: \ link_paths \ remap_paths \ different_source_dirs \ + remap_cwd_bin \ + remap_cwd_rlib \ + remap_cwd_to_empty \ extern_flags smoke: @@ -64,6 +67,45 @@ different_source_dirs: --crate-type rlib) cmp "$(TMPDIR)/libreproducible_build.rlib" "$(TMPDIR)/libfoo.rlib" || exit 1 +remap_cwd_bin: + rm -rf $(TMPDIR) && mkdir $(TMPDIR) + $(RUSTC) reproducible-build-aux.rs + mkdir $(TMPDIR)/test + cp reproducible-build.rs $(TMPDIR)/test + $(RUSTC) reproducible-build.rs --crate-type bin -C debuginfo=2 \ + -Z remap-cwd-prefix=. + cp $(TMPDIR)/reproducible-build $(TMPDIR)/first + (cd $(TMPDIR)/test && \ + $(RUSTC) reproducible-build.rs --crate-type bin -C debuginfo=2 \ + -Z remap-cwd-prefix=.) + cmp "$(TMPDIR)/first" "$(TMPDIR)/reproducible-build" || exit 1 + +remap_cwd_rlib: + rm -rf $(TMPDIR) && mkdir $(TMPDIR) + $(RUSTC) reproducible-build-aux.rs + mkdir $(TMPDIR)/test + cp reproducible-build.rs $(TMPDIR)/test + $(RUSTC) reproducible-build.rs --crate-type rlib -C debuginfo=2 \ + -Z remap-cwd-prefix=. + cp $(TMPDIR)/libreproducible_build.rlib $(TMPDIR)/libfirst.rlib + (cd $(TMPDIR)/test && \ + $(RUSTC) reproducible-build.rs --crate-type rlib -C debuginfo=2 \ + -Z remap-cwd-prefix=.) + cmp "$(TMPDIR)/libfirst.rlib" "$(TMPDIR)/libreproducible_build.rlib" || exit 1 + +remap_cwd_to_empty: + rm -rf $(TMPDIR) && mkdir $(TMPDIR) + $(RUSTC) reproducible-build-aux.rs + mkdir $(TMPDIR)/test + cp reproducible-build.rs $(TMPDIR)/test + $(RUSTC) reproducible-build.rs --crate-type rlib -C debuginfo=2 \ + -Z remap-cwd-prefix= + cp $(TMPDIR)/libreproducible_build.rlib $(TMPDIR)/libfirst.rlib + (cd $(TMPDIR)/test && \ + $(RUSTC) reproducible-build.rs --crate-type rlib -C debuginfo=2 \ + -Z remap-cwd-prefix=) + cmp "$(TMPDIR)/libfirst.rlib" "$(TMPDIR)/libreproducible_build.rlib" || exit 1 + extern_flags: rm -rf $(TMPDIR) && mkdir $(TMPDIR) $(RUSTC) reproducible-build-aux.rs -- cgit 1.4.1-3-g733a5 From 4933be9e2f7bec805980342f882c235c92755a7c Mon Sep 17 00:00:00 2001 From: danakj Date: Wed, 15 Sep 2021 11:49:12 -0400 Subject: Verify bin crates are not deterministic on Windows This disables the remap_cwd_bin test which is failing on windows, and adds a test for --remap-path-prefix making a bin crate instead, to see if it will fail the same way. --- .github/workflows/ci.yml | 5 +++++ src/ci/github-actions/ci.yml | 5 +++++ .../run-make-fulldeps/reproducible-build/Makefile | 24 +++++++++++++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff4fa1527e9..76318ab7cb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -534,6 +534,11 @@ jobs: strategy: matrix: include: + - name: x86_64-msvc-1 + env: + RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler" + SCRIPT: make ci-subset-1 + os: windows-latest-xl - name: dist-x86_64-linux os: ubuntu-latest-xl env: {} diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 6417f5a984a..e4c402b417e 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -668,6 +668,11 @@ jobs: strategy: matrix: include: + - name: x86_64-msvc-1 + env: + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler + SCRIPT: make ci-subset-1 + <<: *job-windows-xl - *dist-x86_64-linux master: diff --git a/src/test/run-make-fulldeps/reproducible-build/Makefile b/src/test/run-make-fulldeps/reproducible-build/Makefile index 762cf5ed2ea..46885fdb7df 100644 --- a/src/test/run-make-fulldeps/reproducible-build/Makefile +++ b/src/test/run-make-fulldeps/reproducible-build/Makefile @@ -9,12 +9,18 @@ all: \ opt \ link_paths \ remap_paths \ - different_source_dirs \ - remap_cwd_bin \ + different_source_dirs_bin \ + different_source_dirs_rlib \ remap_cwd_rlib \ remap_cwd_to_empty \ extern_flags +# TODO: Deterministic builds of `bin` crate types are not deterministic with +# debuginfo=2 on Windows. +# See https://github.com/rust-lang/rust/pull/87320#issuecomment-920105533 +# different_source_dirs_bin \ +# remap_cwd_bin \ + smoke: rm -rf $(TMPDIR) && mkdir $(TMPDIR) $(RUSTC) linker.rs -O @@ -55,7 +61,19 @@ remap_paths: $(RUSTC) reproducible-build.rs --crate-type rlib --remap-path-prefix=/b=/c cmp "$(TMPDIR)/libreproducible_build.rlib" "$(TMPDIR)/libfoo.rlib" || exit 1 -different_source_dirs: +different_source_dirs_bin: + rm -rf $(TMPDIR) && mkdir $(TMPDIR) + $(RUSTC) reproducible-build-aux.rs + mkdir $(TMPDIR)/test + cp reproducible-build.rs $(TMPDIR)/test + $(RUSTC) reproducible-build.rs --crate-type bin --remap-path-prefix=$$PWD=/b + cp $(TMPDIR)/reproducible-build $(TMPDIR)/foo + (cd $(TMPDIR)/test && $(RUSTC) reproducible-build.rs \ + --remap-path-prefix=$(TMPDIR)/test=/b \ + --crate-type bin) + cmp "$(TMPDIR)/reproducible-build" "$(TMPDIR)/foo" || exit 1 + +different_source_dirs_rlib: rm -rf $(TMPDIR) && mkdir $(TMPDIR) $(RUSTC) reproducible-build-aux.rs mkdir $(TMPDIR)/test -- cgit 1.4.1-3-g733a5 From c0118289efbd3d0c61ae8912426a211e53abe208 Mon Sep 17 00:00:00 2001 From: danakj Date: Wed, 15 Sep 2021 13:37:22 -0400 Subject: Disable both reproducible-build tests for crate-type=bin These tests fail on Windows, as the build is not deterministic there for bin targets. Issue https://github.com/rust-lang/rust/issues/88982 is filed for this problem. --- .github/workflows/ci.yml | 5 ----- src/ci/github-actions/ci.yml | 5 ----- src/test/run-make-fulldeps/reproducible-build/Makefile | 9 +++++---- 3 files changed, 5 insertions(+), 14 deletions(-) (limited to 'src/test') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76318ab7cb9..ff4fa1527e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -534,11 +534,6 @@ jobs: strategy: matrix: include: - - name: x86_64-msvc-1 - env: - RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler" - SCRIPT: make ci-subset-1 - os: windows-latest-xl - name: dist-x86_64-linux os: ubuntu-latest-xl env: {} diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index e4c402b417e..6417f5a984a 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -668,11 +668,6 @@ jobs: strategy: matrix: include: - - name: x86_64-msvc-1 - env: - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler - SCRIPT: make ci-subset-1 - <<: *job-windows-xl - *dist-x86_64-linux master: diff --git a/src/test/run-make-fulldeps/reproducible-build/Makefile b/src/test/run-make-fulldeps/reproducible-build/Makefile index 46885fdb7df..adccc153568 100644 --- a/src/test/run-make-fulldeps/reproducible-build/Makefile +++ b/src/test/run-make-fulldeps/reproducible-build/Makefile @@ -9,15 +9,16 @@ all: \ opt \ link_paths \ remap_paths \ - different_source_dirs_bin \ different_source_dirs_rlib \ remap_cwd_rlib \ remap_cwd_to_empty \ extern_flags -# TODO: Deterministic builds of `bin` crate types are not deterministic with -# debuginfo=2 on Windows. -# See https://github.com/rust-lang/rust/pull/87320#issuecomment-920105533 +# TODO: Builds of `bin` crate types are not deterministic with debuginfo=2 on +# Windows. +# See: https://github.com/rust-lang/rust/pull/87320#issuecomment-920105533 +# Issue: https://github.com/rust-lang/rust/issues/88982 +# # different_source_dirs_bin \ # remap_cwd_bin \ -- cgit 1.4.1-3-g733a5