If we're running cargo, we need to add the runner name to the cache. Otherwise things that link
against system packages, like openssl, can break when we use the same cache across different
versions of the runner OS. For example, when going from Ubuntu 20.04 to 22.04, we move from OpenSSL
1.1.x to 3.x.
For test commands, there can be arguments passed to the test binary like `-- --ignored` or `--
--test-threads=1`. For these cases to work properly, the `args` parameter needs to be added to the
end of the 'test' command.
While in theory this should work without `cross`, compiling `openssl` with the
`vendored` feature fails when we run `cargo build --target i686-unknown-linux-musl`.
This commit updates the tests to check that this works and also rewrites the
test script from Bash to Perl.
Co-authored-by: Dave Rolsky <autarch@urth.org>
If there were both debug & release dirs it would only strip one binary, and if
the debug dir had no binary at all it would error, even if the release dir had
one.