emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

Added test case for ARMhf static binary #44

Closed snobu closed 6 years ago

snobu commented 6 years ago

Added test case for ARMhf static binary.

Also rearranged the tests a little to make it easier to add more targets in the future. I wanted to use some colors but not sure how Travis CI handles ANSI, so dropped the idea. I can reconsider though :)

./test-image now produces:

...

Successfully built adce5d11fb8d
Successfully tagged rust-musl-builder-using-diesel:latest
Hello, world!
No DATABASE_URL set, so doing nothing
     Created binary (application) `testme` project

Running tests...

--- Test case for x86_64:
   Compiling testme v0.1.0 (file:///home/rust/src/testme)
    Finished dev [unoptimized + debuginfo] target(s) in 0.73 secs
ldd says:
    not a dynamic executable
[PASS] x86_64 binary is statically linked.

--- Test case for ARMhf:
   Compiling testme v0.1.0 (file:///home/rust/src/testme)
    Finished dev [unoptimized + debuginfo] target(s) in 0.82 secs
ldd says:
    not a dynamic executable
[PASS] ARMhf binary is statically linked.
emk commented 6 years ago

Very nicely done, and thank you very much! Merging.

emk commented 6 years ago

Oh, so sorry. I thought I had merged this 12 days ago, but I didn't. My apologies!

Please don't ever hesitate to ping me if I manage to overlook a patch.