mirror of
https://github.com/Radarr/Radarr
synced 2024-12-23 08:22:39 +00:00
77f146b262
Originally called project metis, this feature allows you to do a lot of cool stuff, such as upgrading to a x265 encode, downloading releases with multiple languages, etc. Check out the wiki page at: https://github.com/Radarr/Radarr/wiki/Custom-Formats to learn more! Note: This feature is currently in "beta" and will get more tags and features in the future. Please let me know, if you have any issues and I hope this will allow for a lot of customization!
52 lines
1.4 KiB
Bash
Executable file
52 lines
1.4 KiB
Bash
Executable file
PLATFORM=$1
|
|
TYPE=$2
|
|
WHERE="cat != ManualTest"
|
|
TEST_DIR="."
|
|
TEST_PATTERN="*Test.dll"
|
|
ASSEMBLIES=""
|
|
|
|
if [ -d "$TEST_DIR/_tests" ]; then
|
|
TEST_DIR="$TEST_DIR/_tests"
|
|
fi
|
|
|
|
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe"
|
|
NUNIT_COMMAND="$NUNIT"
|
|
NUNIT_PARAMS="--result=$TEST_DIR/reports/junit/results-$TYPE.xml;transform=.circleci/nunit3-junit.xslt --agents=12 --config=Debug"
|
|
|
|
if [ "$PLATFORM" = "Windows" ]; then
|
|
WHERE="$WHERE && cat != LINUX"
|
|
elif [ "$PLATFORM" = "Linux" ]; then
|
|
WHERE="$WHERE && cat != WINDOWS"
|
|
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
|
|
elif [ "$PLATFORM" = "Mac" ]; then
|
|
WHERE="$WHERE && cat != WINDOWS"
|
|
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
|
|
else
|
|
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$TYPE" = "Unit" ]; then
|
|
WHERE="$WHERE && cat != IntegrationTest && cat != AutomationTest"
|
|
elif [ "$TYPE" = "Integration" ] || [ "$TYPE" = "int" ] ; then
|
|
WHERE="$WHERE && cat == IntegrationTest"
|
|
elif [ "$TYPE" = "Automation" ] ; then
|
|
WHERE="$WHERE && cat == AutomationTest"
|
|
else
|
|
echo "Type must be provided as second argument: Unit, Integration or Automation"
|
|
exit 2
|
|
fi
|
|
|
|
for i in `find $TEST_DIR -name "$TEST_PATTERN"`;
|
|
do ASSEMBLIES="$ASSEMBLIES $i"
|
|
done
|
|
|
|
$NUNIT_COMMAND --where "$WHERE" $NUNIT_PARAMS $ASSEMBLIES;
|
|
EXIT_CODE=$?
|
|
|
|
if [ "$EXIT_CODE" -ge 0 ]; then
|
|
echo "Failed tests: $EXIT_CODE"
|
|
exit $EXIT_CODE
|
|
else
|
|
exit $EXIT_CODE
|
|
fi
|