140 lines
5.4 KiB
Plaintext
Executable File
140 lines
5.4 KiB
Plaintext
Executable File
This is the top directory for the LaGriT Test Suite.
|
|
|
|
There are 3 directories each with subdirectories to test various LaGriT commands. These directories also provide good examples of methods to build or evaluate meshes using LaGriT.
|
|
|
|
level01 - essential commands as part of LaGriT QA status
|
|
level02 - depends on external libs built in TPLs ie ExodusII
|
|
level03 - development for new capabilities and known issues (not part of automatic testing)
|
|
|
|
USAGE (will run ../build/lagrit):
|
|
python runtests.py
|
|
|
|
USAGE WITH OPTIONS:
|
|
python runtests.py --levels 1 2 -exe ../build/lagrit
|
|
python runtests.py --levels 1
|
|
python runtests.py -exe /mypath/build/lagrit
|
|
python runtests.py --help
|
|
|
|
OUTPUT:
|
|
The screen output will report a summary of results.
|
|
Summary files written: diffout_$OS.txt and stdout_$OS.txt
|
|
|
|
################################################################
|
|
EXAMPLE TESTS PASS
|
|
################################################################
|
|
|
|
python runtests.py
|
|
...........................................
|
|
----------------------------------------------------------------------
|
|
Ran 43 tests in 65.853s
|
|
|
|
OK
|
|
|
|
################################################################
|
|
EXAMPLE TEST FAIL
|
|
################################################################
|
|
|
|
39 Check Directory ./single_triangle --------------------------
|
|
|
|
Test has 258 diffs at line 1 >>
|
|
Test has 258 extra lines in this chunk.
|
|
|
|
...
|
|
|
|
-
|
|
+ 64 fsetnames VCHA scalar max_number_sets const perma l
|
|
-
|
|
+ 65 number_of_fsets INT scalar scalar const perma l 0.000E+00
|
|
-
|
|
+finish
|
|
-
|
|
+LaGriT successfully completed
|
|
|
|
Lines Essentially the Same: 0 out of 258
|
|
|
|
Removed 10 comment lines.
|
|
516 lines failed.
|
|
39 Done with Directory ./single_triangle -----------------------
|
|
|
|
All checks complete, 1 directories failed out of 40
|
|
|
|
################################################################
|
|
|
|
DETAILS ABOUT THE TEST SUITE
|
|
|
|
The LaGriT test directories are split into 3 types. level01 are required as part of the QA status and all tests should pass for any released version of LaGriT. level02 depend on external libraries such as ExodusII. level03 contain subdirectories for new capabilities or known issues. level03 are for developers and are not included in the python test scripts for automatic testing. Once a capability is full developed and output is stable, it will be added to the level01 test suite.
|
|
|
|
For each test directory there is a reference directory with expected output. Differences between the "outx3dgen" and "reference/outx3dgen" files will indicate why a test fails. The reference directory also contains all out* mesh files written during the run. These can be helpful as examples and for tracking down errors during testing.
|
|
|
|
|
|
LAGRIT TEST DIRECTORIES
|
|
|
|
level01/
|
|
└── addmesh_add
|
|
└── reference
|
|
...
|
|
└── triangulate_polygon
|
|
└── reference
|
|
└── zone_outside
|
|
└── reference
|
|
level02/
|
|
└── exodus_cube
|
|
└── reference
|
|
└── exodus_prisms
|
|
└── reference
|
|
└── write_exo
|
|
└── reference
|
|
level03/
|
|
└── read_gocad
|
|
└── reference
|
|
└── poisson_circle
|
|
└── reference
|
|
└── poisson_non_convex
|
|
└── reference
|
|
|
|
TO RUN AND CHECK A SINGLE TEST:
|
|
|
|
Go to the level* directory
|
|
Run the script clean_testdirs if you want to start with clean directories.
|
|
Go into the individual directory (ie addmesh_add).
|
|
Run lagrit exectuable and compare to files in reference directory.
|
|
lagrit -out outx3dgen < input.lgi
|
|
diff outx3dgen reference/outx3dgen
|
|
Or use default output file names:
|
|
lagrit < input.lgi
|
|
diff lagrit.out reference/outx3dgen
|
|
|
|
|
|
TO DIFF OUTX3DGEN IN ALL DIRECTORIES
|
|
|
|
The python test script runtests.py compares the outx3dgen and reference/outx3dgen files. The script will filter out any acceptable differences and will FAIL differences that seem relevant. If one or more of the tests fail, you may want to check those differences.
|
|
|
|
From the command line, loop through all directories and diff the outx3dgen files:
|
|
|
|
for dir in * ; do echo $dir "---------------------------"; diff $dir/outx3dgen $dir/reference/outx3dgen; done
|
|
|
|
Differences such as negative zeros are ignored so this diff passes the test:
|
|
|
|
385 < The unit vector for top is 0.0000000i 0.0000000j 1.0000000k
|
|
387 > The unit vector for top is 0.0000000i -0.0000000j 1.0000000k
|
|
|
|
Differences in the banner are expected:
|
|
|
|
< * * Program: LaGriT V3.3.3 Linux *
|
|
< * * Date Compile: 2023/12/22 *
|
|
< * * Run Time: 2024/Jan 2 12:47:46 *
|
|
< * * Manual: https://lagrit.lanl.gov *
|
|
---
|
|
> * * Program: LaGriT V3.330 Linux *
|
|
> * * date_compile: 2021/10/15 test *
|
|
> * * Run Time: 2021/Nov 9 11:25:38 *
|
|
> * * Manual: http://lagrit.lanl.gov *
|
|
|
|
|
|
Changes in code can result in small reporting differences. Most can be ignored but release versions should not show these type of difference.
|
|
|
|
< 30 ipolydat CHAR scalar scalar const perma l yes
|
|
---
|
|
> 30 ipolydat CHAR scalar scalar const perma l no
|
|
|