3 Commits

Author SHA1 Message Date
784f64ca16 Added Woodpecker build infop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-08-05 17:45:52 -04:00
1ff6b671eb Updated the README; added copyright info to LICENSE file 2022-08-05 17:29:05 -04:00
33e540add4 Fixed a small logic error; Updated Rust version to build against in the Docker build script 2022-08-05 13:48:24 -04:00
5 changed files with 47 additions and 7 deletions

26
.woodpecker.yml Normal file
View File

@ -0,0 +1,26 @@
pipeline:
test_build:
image: rust:1.62
commands:
- cargo build
build_release:
image: rust:1.62
commands:
- cargo build --release
- "mv target/release/nettest target/release/nettest-${CI_COMMIT_TAG}-linux-x86_64"
- "mv target/release/hdtest target/release/hdtest-${CI_COMMIT_TAG}-linux-x86_64"
when:
event: tag
gitea_release:
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_api_key
base_url: https://git.metaunix.net
files:
- "target/release/*${CI_COMMIT_TAG}-linux-x86_64"
title: "${CI_COMMIT_TAG}"
when:
event: tag

View File

@ -1,4 +1,4 @@
Copyright (c) <year> <owner>
Copyright (c) 2022 Bit Goblin
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@ -1,3 +1,17 @@
# test-scripts
# Bit Goblin Hardware Tests
Scripts used for testing hardware in Bit Goblin's videos
Scripts used for testing hardware in Bit Goblin's videos.
## Download & Installation
Check out the [Releases page](https://git.metaunix.net/BitGoblin/hardware-tests/releases) to find the latest compiled binaries.
Currently there is no installation method other than downloading the provided release binaries. In the future I want to build Linux package repositories for this, and have a Windows installer.
## Building
The easiest way to build the program is using the official Rust image from Docker Hub, for which there's a wrapper script at `bin/docker-build.sh` that can be used to build the test programs. These will be available under `target/debug/`.
## License
The Bit Goblin hardware test suite is available via the BSD 2-Clause license, so feel free to hack away at it!

2
bin/docker-build.sh Normal file → Executable file
View File

@ -1,3 +1,3 @@
#!/bin/sh
docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/usr/src/hardware-tests -w /usr/src/hardware-tests rust:1.59 cargo build --release
docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/usr/src/hardware-tests -w /usr/src/hardware-tests rust:1.62 cargo build

View File

@ -57,7 +57,7 @@ fn ping_host(host: &str) {
// timed file copy test to guage bandwidth speeds
fn bandwidth_test(download: &str, output: &str) {
println!("Testing network bandwidth by downloading {}", download, output);
println!("Testing network bandwidth by downloading {}.", download);
// get start time so we can track how long it takes to complete
let start_time = Utc::now();