Commit fb2d046a authored by Drew's avatar Drew

Make the tests run on Linux

parent 2986a353
Subproject commit d59340045fe4a647fdc1dc91fc0ca17d69018b4d
Subproject commit d748db6908297a7af63f52c09185c085eed88fc3
FROM drewcrawford/swift:latest
#install atbuild
#RUN apt-get update && apt-get install --no-install-recommends xz-utils -y
ADD atbuild /usr/local/bin/atbuild
#ADD https://github.com/AnarchyTools/atbuild/releases/download/0.4.0/atbuild-0.4.0-linux.tar.xz /atbuild.tar.xz
#RUN tar xf atbuild.tar.xz -C /usr/local
ADD . /NaOH
WORKDIR NaOH
RUN LD_LIBRARY_PATH=AnarchyDispatch/build/lib atbuild run-tests --overlay linux
\ No newline at end of file
......@@ -21,4 +21,9 @@ extension String {
}
#endif
//who defines NSTemporaryDirectory?
#if os(Linux)
func NSTemporaryDirectory() -> String {
return "/tmp/"
}
#endif
import XCTest
XCTMain([
CryptoSecretBoxTests(),
KeyTests(),
KeyFileTests(),
CryptoBoxTests(),
CryptoStreamTestsTests(),
MemCmpTests(),
GenericHashTests(),
IncrementTestsTests()
])
\ No newline at end of file
#!/bin/bash
#install dependencies only if we don't have them
deps=("make" "sed")
install_deps() {
apt-get update
apt-get install --no-install-recommends -y ${deps[@]}
}
if [ `uname` == "Linux" ]; then
dpkg -s "${deps[@]}" >/dev/null 2>&1 || install_deps
fi
cd libsodium
if [ ! -f libsodium.tar.gz ]; then
curl -L https://github.com/jedisct1/libsodium/releases/download/1.0.7/libsodium-1.0.7.tar.gz -o libsodium.tar.gz
......@@ -14,5 +23,4 @@ if [ ! -f Makefile ]; then
fi
if [ ! -f src/libsodium/.libs/libsodium.a ]; then
make -j8
rm src/libsodium/.libs/libsodium.dylib
fi
module CSodium [system] {
header "libsodium/src/libsodium/include/sodium.h"
link "sodium"
export *
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment