Nantes Université

Skip to content
Extraits de code Groupes Projets
test-2-add-inside-relationship-mapping 1,17 ko
Newer Older
ayushkumarshah's avatar
ayushkumarshah a validé
#!/bin/bash

R's avatar
R a validé
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
R's avatar
R a validé

# 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:"
R's avatar
R a validé
echo "  LgEvalDir    $LgEvalDir"
echo "  PYTHONPATH   $PYTHONPATH"
echo "  PATH         $PATH"
R's avatar
R a validé

ayushkumarshah's avatar
ayushkumarshah a validé
TEST_FILES=`ls ../../tests/sqrt_lg/*.lg` 
for file in $TEST_FILES
do
R's avatar
R a validé
  lg2mml ../../tests/sqrt_lg/$file
ayushkumarshah's avatar
ayushkumarshah a validé
  filename=`basename $file .lg`
  echo Input:"      "$file
  echo "  >>MathML:    $filename.mml"
ayushkumarshah's avatar
ayushkumarshah a validé
done
# Deactivate virtualenv
deactivate