mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
2570ddcb17
* Use-after-free because we free network before dht in one case. * Various unchecked allocs in tests (not so important). * We used to not check whether ping arrays were actually allocated in DHT. * `ping_kill` and `ping_array_kill` used to crash when passing NULL. Also: * Added an assert in all public API functions to ensure tox isn't NULL. The error message you get from that is a bit nicer than "Segmentation fault" when clients (or our tests) do things wrong. * Decreased the sleep time in iterate_all_wait from 20ms to 5ms. Everything seems to still work with 5ms, and this greatly decreases the amount of time spent per test run, making oomer run much faster.
25 lines
734 B
Bash
Executable File
25 lines
734 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
docker_build() {
|
|
tar c $(git ls-files) | docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node -
|
|
}
|
|
|
|
# Run Docker build once. If it succeeds, we're good.
|
|
if docker_build; then
|
|
exit 0
|
|
fi
|
|
|
|
# We're not good. Run it again, but now capture the output.
|
|
OUTPUT=$(docker_build || true 2>&1)
|
|
|
|
if echo "$OUTPUT" | grep '/usr/local/bin/tox-bootstrapd: FAILED'; then
|
|
# This is a checksum warning, so we need to update it.
|
|
IMAGE=$(echo "$OUTPUT" | grep '^ ---> [0-9a-f]*$' | grep -o '[0-9a-f]*$' | tail -n1)
|
|
docker run --rm "$IMAGE" sha256sum /usr/local/bin/tox-bootstrapd > other/bootstrap_daemon/docker/tox-bootstrapd.sha256
|
|
fi
|
|
|
|
# Run once last time to complete the build.
|
|
docker_build
|