#!/bin/bash echo "Running test for issue 2 (inside relationship mapping)..." # Do not modify user environment. # User can install virtualenv for python if not installed. #pip install virtualenv # Create the virtual environment only once. if [ ! -f .venv/bin/activate ] then virtualenv .venv source .venv/bin/activate pip install beautifulsoup4==4.9.2 fi # RZ -- need to set LgEvalDir and PYTHONPATH for # this to work. # # NOTE: These definitions are lost after the # script ends (they are associated only with the # invoked process that the shell program runs in) # # NOTE 2: You *must* use export to define a variable # that you want to be visible in child processes # (e.g., where lg2mml is called below) export LgEvalDir=`cd ../..; pwd` export PYTHONPATH=`cd ../../../; pwd`/ export PATH=$LgEvalDir/bin:$PATH echo "Environment Variables:" echo " LgEvalDir $LgEvalDir" echo " PYTHONPATH $PYTHONPATH" echo " PATH $PATH" echo "" TEST_FILES=`ls ../../tests/sqrt_lg/*.lg` for file in $TEST_FILES do lg2mml ../../tests/sqrt_lg/$file filename=`basename $file .lg` echo Input:" "$file echo " >>MathML: $filename.mml" done # Deactivate virtualenv deactivate