Skip to content

Commit

Permalink
Revert changes to the reproducible-builds test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Aug 28, 2016
1 parent e468ede commit 8766c18
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
24 changes: 9 additions & 15 deletions src/test/run-make/reproducible-build/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
-include ../tools.mk
all:
$(RUSTC) reproducible-build-aux.rs
mv "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/first.rlib"
$(RUSTC) reproducible-build-aux.rs
cp "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/second.rlib"
cmp "$(TMPDIR)/first.rlib" "$(TMPDIR)/second.rlib" || exit 1
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build1"
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build2"
cmp "$(TMPDIR)/reproducible-build1" "$(TMPDIR)/reproducible-build2" || exit 1
$(RUSTC) reproducible-build-aux.rs -g
mv "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/first.rlib"
nm "$(TMPDIR)/reproducible-build1" | sort > "$(TMPDIR)/reproducible-build1.nm"
nm "$(TMPDIR)/reproducible-build2" | sort > "$(TMPDIR)/reproducible-build2.nm"
cmp "$(TMPDIR)/reproducible-build1.nm" "$(TMPDIR)/reproducible-build2.nm" || exit 1
$(RUSTC) reproducible-build-aux.rs -g
cp "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/second.rlib"
cmp "$(TMPDIR)/first.rlib" "$(TMPDIR)/second.rlib" || exit 1
$(RUSTC) reproducible-build.rs -g -o"$(TMPDIR)/reproducible-build1-debug"
$(RUSTC) reproducible-build.rs -g -o"$(TMPDIR)/reproducible-build2-debug"
cmp "$(TMPDIR)/reproducible-build1-debug" "$(TMPDIR)/reproducible-build2-debug" || exit 1
$(RUSTC) reproducible-build-aux.rs -O
mv "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/first.rlib"
nm "$(TMPDIR)/reproducible-build1-debug" | sort > "$(TMPDIR)/reproducible-build1-debug.nm"
nm "$(TMPDIR)/reproducible-build2-debug" | sort > "$(TMPDIR)/reproducible-build2-debug.nm"
cmp "$(TMPDIR)/reproducible-build1-debug.nm" "$(TMPDIR)/reproducible-build2-debug.nm" || exit 1
$(RUSTC) reproducible-build-aux.rs -O
cp "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/second.rlib"
cmp "$(TMPDIR)/first.rlib" "$(TMPDIR)/second.rlib" || exit 1
$(RUSTC) reproducible-build.rs -O -o"$(TMPDIR)/reproducible-build1-opt"
$(RUSTC) reproducible-build.rs -O -o"$(TMPDIR)/reproducible-build2-opt"
cmp "$(TMPDIR)/reproducible-build1-opt" "$(TMPDIR)/reproducible-build2-opt" || exit 1
nm "$(TMPDIR)/reproducible-build1-opt" | sort > "$(TMPDIR)/reproducible-build1-opt.nm"
nm "$(TMPDIR)/reproducible-build2-opt" | sort > "$(TMPDIR)/reproducible-build2-opt.nm"
cmp "$(TMPDIR)/reproducible-build1-opt.nm" "$(TMPDIR)/reproducible-build2-opt.nm" || exit 1
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ pub enum Enum {

pub struct TupleStruct(pub i8, pub i16, pub i32, pub i64);

pub trait Marker {}
impl Marker for char {}
impl<T, U> Marker for (T, U) {}

pub trait Trait<T1: Marker + Marker + Marker, T2> where T1: 'static {
type Assoc: Marker;

pub trait Trait<T1, T2> {
fn foo(&self);
}
10 changes: 4 additions & 6 deletions src/test/run-make/reproducible-build/reproducible-build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ impl Trait<i32, u64> for u64 {
fn foo(&self) {}
}

impl<T: reproducible_build_aux::Marker + 'static>
reproducible_build_aux::Trait<T, String> for TupleStruct {
type Assoc = (u8, i16);

impl reproducible_build_aux::Trait<char, String> for TupleStruct {
fn foo(&self) {}
}

Expand Down Expand Up @@ -120,11 +117,12 @@ fn main() {
let _ = reproducible_build_aux::Enum::Variant3 { x: 0 };
let _ = reproducible_build_aux::TupleStruct(1, 2, 3, 4);

let object_shim: &reproducible_build_aux::Trait<char, String, Assoc=(u8, i16)> =
&TupleStruct(0, 1, 2, 3);
let object_shim: &reproducible_build_aux::Trait<char, String> = &TupleStruct(0, 1, 2, 3);
object_shim.foo();

let pointer_shim: &Fn(i32) = &regular_fn;

TupleStruct(1, 2, 3, 4).bar();
}


0 comments on commit 8766c18

Please sign in to comment.