• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

P_alloc_in_struct/23-Nov-2023-128

P_array_init/23-Nov-2023-3124

P_compute/23-Nov-2023-1914

P_ref_count/23-Nov-2023-12295

bitcode_wrapper/22-Nov-2023-5244

debug/23-Nov-2023-2216

opt/23-Nov-2023-141109

padding/23-Nov-2023-318269

READMED22-Nov-20231.6 KiB4334

lit.cfgD22-Nov-20233.5 KiB7555

rs-filecheck-wrapper.shD22-Nov-2023475 167

run-lit-tests.shD22-Nov-2023176 73

scriptc-filecheck-wrapper.shD22-Nov-20231.6 KiB9680

README

1
2Summary
3=======
4This directory contains tests for Slang that use the 'llvm-lit' testing tool.
5Each testcase is a separate .rs file, and comments inside the testcase are
6used to verify certain strings are present in the output bitcode files.
7
8Prerequisites
9=============
10To run the tests, you must have the android build environment variables
11set (i.e. source build/envsetup.sh; lunch). You must also have on your path:
12- Android version of llvm-lit (currently in libbcc/tests/debuginfo)
13- FileCheck (utility from llvm)
14- llvm-rs-cc (slang frontend compiler)
15
16If you are unable to run the tests, try using the "--debug" option to llvm-lit.
17
18When debugging failures, the "-v" option will print to stdout the details of
19the failure. Note that tests marked as "Expected Fail" (XFAIL) will not print
20failure information, even with -v.
21
22Customizing
23===========
24The tools lit and FileCheck are fairly flexible, and could be used to validate
25more than just emitted bitcode. For example, with some changes to the testcases
26and the helper shell-script rs-filecheck-wrapper.sh, it should be possible to
27write tests that verify the emitted Java code.
28
29Running
30=======
31To execute all the tests from this directory, use the Android llvm-lit tool
32from libbcc:
33$ ../../libbcc/tests/debuginfo/llvm-lit .
34
35The tool can be run from any directory.
36-j controls the number of parallel test executions
37-v enables additional verbosity (useful when examining unexpected failures)
38
39Adding new tests
40================
41To add new tests, just add .rs files to a test directory with similar
42RUN/CHECK directives in comments as the existing tests.
43