#!/bin/sh

. ${0%/*}/test_helper.sh

tuxsuite_build="tuxsuite build --git-repo https://github.com/torvalds/linux.git --git-ref master --target-arch arm64 --kconfig defconfig --toolchain gcc-9"

test_same_results_for_the_same_input() {
    api_v1
    run $tuxsuite_build
    output1="$(echo "$output" | sed -s 's#http://localhost:5001/.*#http://localhost:5001/xxxxxxxxxx#' | grep -v "^uid: ")"
    run $tuxsuite_build
    output2="$(echo "$output" | sed -s 's#http://localhost:5001/.*#http://localhost:5001/xxxxxxxxxx#' | grep -v "^uid: ")"
    assertEquals  "$output1" "$output2"
}

. shunit2
