Skip to content

Commit

Permalink
spytest 2.2 - python 3 support and dependencies update (sonic-net#8925)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
Migrate to python 3

How did you do it?
Update the dependencies

How did you verify/test it?
run spytest test cases

Co-authored-by: Rama Sasthri, Kristipati <[email protected]>
  • Loading branch information
ramakristipati and ramakristipatibrcm authored Jul 19, 2023
1 parent 200647b commit a29ea09
Show file tree
Hide file tree
Showing 16 changed files with 1,009 additions and 342 deletions.
1 change: 0 additions & 1 deletion spytest/bin/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ cd $(dirname $0)/..
find . -name __pycache__ | xargs rm -rf
find . -name .pytest_cache | xargs rm -rf
find . -name "*.pyc" | xargs rm -f

48 changes: 28 additions & 20 deletions spytest/bin/env
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
#!/bin/sh

if [ -z "$SCID" ]; then
if [ -z "$SCID" -o ! -d "$SCID" ]; then
export SCID=/opt/projects/scid
if [ ! -d $SCID ]; then
export SCID=/projects/scid
else
echo "================== USING LOCAL SPYTEST TOOLS ================="
fi
fi

if [ "$SCID_PYTHON_BIN" != "" ]; then
echo "USING Python From $SCID_PYTHON_BIN"
elif [ "$SPYTEST_PYTHON_VERSION" = "3.6.6" ]; then
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/3.6.6/bin
elif [ "$SPYTEST_PYTHON_VERSION" = "3.7.1" ]; then
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/3.7.1/bin
echo "# Python From $SCID_PYTHON_BIN"
elif [ -z "$SPYTEST_PYTHON_VERSION" -o "$SPYTEST_PYTHON_VERSION" = "current" ]; then
export SCID_PYTHON_BIN=$SCID/tools/Python-3.8.12/bin
if [ ! -f $SCID_PYTHON_BIN/python ]; then
export SCID_PYTHON_BIN=$SCID/tools/Python-3.8/bin
fi
#echo "# Branch default Python From $SCID_PYTHON_BIN"
elif [ -d $SCID/tools/Python-$SPYTEST_PYTHON_VERSION/bin ]; then
export SCID_PYTHON_BIN=$SCID/tools/Python-$SPYTEST_PYTHON_VERSION/bin
elif [ -d $SCID/tools/ActivPython/$SPYTEST_PYTHON_VERSION/bin ]; then
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/$SPYTEST_PYTHON_VERSION/bin
elif [ -d $SCID/tools/ActivPython/venv/$SPYTEST_PYTHON_VERSION/bin ]; then
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/venv/$SPYTEST_PYTHON_VERSION/bin
else
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/venv/3.8.0/bin
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/3.7.1/bin
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/3.6.6/bin
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/current/bin
fi

if [ -z "$SCID_TGEN_PATH=" ]; then
export SCID_TGEN_PATH=$SCID/tgen
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/venv/3.8.0/bin
export SCID_PYTHON_BIN=$SCID/tools/ActivPython/current/bin
fi

if [ -z "$SPYTEST_PYTHON" ]; then
export SPYTEST_PYTHON=$SCID_PYTHON_BIN/python
export SCID_TGEN_PATH=$SCID/tgen
if [ -z "$SPYTEST_PYTHON" -o -n "$SPYTEST_PYTHON_VERSION" ]; then
if [ -f $SCID_PYTHON_BIN/python$SPYTEST_PYTHON_VERSION ]; then
export SPYTEST_PYTHON=$SCID_PYTHON_BIN/python$SPYTEST_PYTHON_VERSION
else
export SPYTEST_PYTHON=$SCID_PYTHON_BIN/python
fi
fi
export PATH=$SCID/tools/bin:$PATH

Expand All @@ -41,7 +46,10 @@ if [ -z "$SCID_TCL85_BIN" ]; then
fi
if [ ! -d $SCID_TCL85_BIN ]; then
# use native tcl 8.5
SCID_TCL85_BIN=$(dirname $(which tclsh8.5))
tchsh85=$(which tclsh8.5)
if [ -n "$tchsh85" ]; then
SCID_TCL85_BIN=$(dirname $tchsh85)
fi
fi
export SCID_TCL84_BIN=$SCID/tools/tcl/8.4.20/bin

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCID/tools/lib
14 changes: 0 additions & 14 deletions spytest/bin/generate_api_docs.sh

This file was deleted.

Loading

0 comments on commit a29ea09

Please sign in to comment.