aboutsummaryrefslogtreecommitdiff
path: root/test/oryx/test_python_project.sh
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2022-11-17 22:55:43 +0300
committerGitHub <noreply@github.com>2022-11-17 22:55:43 +0300
commit3fc9604ddadc34ec44651ce981cebc7bd77095e5 (patch)
tree46f1603423215c57744c7165d71fd78d53afd888 /test/oryx/test_python_project.sh
parentbe4f0498e4ad7948804d4be70093c1da8722d222 (diff)
Oryx: Build with .NET 6 (#298)
* Oryx: Install dotnet 3.1 runtime * fix tests * build with .NET 6 + add tests * add tests * fix tests * shellcheck: nit
Diffstat (limited to 'test/oryx/test_python_project.sh')
-rw-r--r--test/oryx/test_python_project.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/oryx/test_python_project.sh b/test/oryx/test_python_project.sh
new file mode 100644
index 0000000..a0d5eef
--- /dev/null
+++ b/test/oryx/test_python_project.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+cd sample-python
+
+# Replicates Oryx's behavior for universal image
+DEBIAN_FLAVOR="focal-scm"
+mkdir -p /opt/oryx && echo "vso-focal" > /opt/oryx/.imagetype
+echo "DEBIAN|${DEBIAN_FLAVOR}" | tr '[a-z]' '[A-Z]' > /opt/oryx/.ostype
+
+ln -snf /usr/local/oryx/* /opt/oryx
+
+PYTHON_PATH="/home/codespace/.python/current"
+mkdir -p /home/codespace/.python
+ln -snf /usr/local/python/current $PYTHON_PATH
+ln -snf /usr/local/python /opt/python
+
+export PATH="/home/codespace/.python/current/bin:${PATH}"
+which python
+
+pythonVersion=$(python -V 2>&1 | grep -Po '(?<=Python )(.+)')
+pythonSite=`python -m site --user-site`
+check "oryx-build-python" oryx build --property python_version="${pythonVersion}" --property packagedir="${pythonSite}" ./
+check "oryx-build-python-installed" python3 -m pip list | grep mpmath
+check "oryx-build-python-result" python3 ./src/solve.py
+
+# Report result
+reportResults