restructure the output layout
also reorganize the scripts folder
This commit is contained in:
parent
df3a5fba7a
commit
4cc15b1246
61 changed files with 926 additions and 3213 deletions
20
scripts/test/smoke-test.ps1
Normal file
20
scripts/test/smoke-test.ps1
Normal file
|
@ -0,0 +1,20 @@
|
|||
. "$PSScriptRoot\..\_common.ps1"
|
||||
|
||||
# Restore and compile the test app
|
||||
dotnet restore "$RepoRoot\test\TestApp" --runtime "osx.10.10-x64" --runtime "ubuntu.14.04-x64" --runtime "win7-x64"
|
||||
dotnet compile "$RepoRoot\test\TestApp" --output "$RepoRoot\artifacts\$Rid\smoketest"
|
||||
|
||||
# Run the app and check the exit code
|
||||
& "$RepoRoot\artifacts\$Rid\smoketest\TestApp.exe"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Test App failed to run"
|
||||
}
|
||||
|
||||
# Check that a compiler error is reported
|
||||
$oldErrorAction = $ErrorActionPreference
|
||||
$ErrorActionPreference="SilentlyContinue"
|
||||
dotnet compile "$RepoRoot\test\compile\failing\SimpleCompilerError" --framework "$Tfm" 2>$null >$null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
throw "Compiler error didn't cause non-zero exit code!"
|
||||
}
|
||||
$ErrorActionPreference = $oldErrorAction
|
31
scripts/test/smoke-test.sh
Executable file
31
scripts/test/smoke-test.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
REPOROOT="$( cd -P "$DIR/../.." && pwd )"
|
||||
|
||||
source "$DIR/../_common.sh"
|
||||
|
||||
rm "$REPOROOT/test/TestApp/project.lock.json"
|
||||
dotnet restore "$REPOROOT/test/TestApp" --runtime "osx.10.10-x64" --runtime "ubuntu.14.04-x64" --runtime "win7-x64"
|
||||
dotnet compile "$REPOROOT/test/TestApp" --output "$REPOROOT/artifacts/$RID/smoketest"
|
||||
|
||||
# set -e will abort if the exit code of this is non-zero
|
||||
$REPOROOT/artifacts/$RID/smoketest/TestApp
|
||||
|
||||
# Check that a compiler error is reported
|
||||
set +e
|
||||
dotnet compile "$REPOROOT/test/compile/failing/SimpleCompilerError" --framework "$TFM" 2>/dev/null >/dev/null
|
||||
rc=$?
|
||||
if [ $rc == 0 ]; then
|
||||
error "Compiler failure test failed! The compiler did not fail to compile!"
|
||||
exit 1
|
||||
fi
|
||||
set -e
|
Loading…
Add table
Add a link
Reference in a new issue