unittest.ps1 765 Bytes
Newer Older
1
2
3
4
5
6
7
8
$CWD = $PWD

# -------------For python unittest-------------

## ------Run annotation test------
echo ""
echo "===========================Testing: nni_annotation==========================="
cd $CWD/../tools/
9
python -m unittest -v nni_annotation/test_annotation.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

## Export certain environment variables for unittest code to work
$env:NNI_TRIAL_JOB_ID="test_trial_job_id"
$env:NNI_PLATFORM="unittest"

## ------Run sdk test------
echo ""
echo "===========================Testing: nni_sdk==========================="
cd $CWD/../src/sdk/pynni/
python -m unittest discover -v tests



# -------------For typescript unittest-------------
cd $CWD/../src/nni_manager
echo ""
echo "===========================Testing: nni_manager==========================="
npm run test