Skip to content

Commit 707a9d6

Browse files
committed
travis - dotnet 3.1, fixes cwd
1 parent 338df74 commit 707a9d6

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

build/install_dependencies_ubuntu.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sudo dpkg -i packages-microsoft-prod.deb
1212
sudo apt-get update
1313
sudo apt-get install apt-transport-https
1414
sudo apt-get update
15-
sudo apt-get install dotnet-sdk-3.0 -y
15+
sudo apt-get install dotnet-sdk-3.1 -y
1616

1717
# Install Python Pip and icdiff (http://www.jefftk.com/icdiff)
1818

build/runtests.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Absolute paths - https://stackoverflow.com/a/246128/2105235
55
TESTS_DIR=$PWD/tests
6-
OUTPUT_DIR="$TESTS_DIR/bin/Release/netcoreapp3.0"
6+
OUTPUT_DIR="$TESTS_DIR/bin/Release/netcoreapp3.1"
77

88
PHP_TMP_FILE=$OUTPUT_DIR/php.out
99
PEACH_TMP_FILE=$OUTPUT_DIR/peach.out
@@ -19,9 +19,8 @@ for PHP_FILE in $(find $TESTS_DIR -name *.php)
1919
do
2020
# Run each file in the directory it is contained in (in order for relative paths to work)
2121
PHP_FILE_DIR=$(dirname $PHP_FILE)
22-
cd $PHP_FILE_DIR
2322

24-
# Obtain the relative path to the PHP file so that the inclusion in Peachpie works properly
23+
# Obtain the relative path for the log
2524
CUT_START=$((${#TESTS_DIR} + 2))
2625
PHP_FILE_REL=$(echo $PHP_FILE | cut -c $CUT_START-)
2726

@@ -34,8 +33,10 @@ do
3433
continue;
3534
fi
3635

36+
cd TESTS_DIR
37+
3738
PHP_OUTPUT="$(php -d display_errors=Off -d log_errors=Off $PHP_FILE)"
38-
PEACH_OUTPUT="$(dotnet $OUTPUT_DIR/Tests.dll $PHP_FILE_REL)"
39+
PEACH_OUTPUT="$(dotnet $OUTPUT_DIR/Tests.dll $PHP_FILE_DIR $PHP_FILE)"
3940

4041
# .. or if either Peachpie or PHP returned a special string
4142
if [ "$PHP_OUTPUT" = "***SKIP***" -o "$PEACH_OUTPUT" = "***SKIP***" ] ; then

tests/Tests.msbuildproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
66
<StartupObject>program.phpx</StartupObject>
77
<DisableImplicitPeachpieReferences>true</DisableImplicitPeachpieReferences>
88
</PropertyGroup>

tests/program.phpx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<?php
22

3-
include $argv[1];
3+
chdir($argv[1]);
4+
include $argv[2];

0 commit comments

Comments
 (0)