1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 6d24f2138b
Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56)
3 years ago
..
P_alloc_in_struct Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
P_array_init Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
P_compute Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
P_ref_count Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
bitcode_wrapper Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
debug Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
opt Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
padding Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
README Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
lit.cfg Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
rs-filecheck-wrapper.sh Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
run-lit-tests.sh Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
scriptc-filecheck-wrapper.sh Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago

README

Summary
=======
This directory contains tests for Slang that use the 'llvm-lit' testing tool.
Each testcase is a separate .rs file, and comments inside the testcase are
used to verify certain strings are present in the output bitcode files.

Prerequisites
=============
To run the tests, you must have the android build environment variables
set (i.e. source build/envsetup.sh; lunch). You must also have on your path:
- Android version of llvm-lit (currently in libbcc/tests/debuginfo)
- FileCheck (utility from llvm)
- llvm-rs-cc (slang frontend compiler)

If you are unable to run the tests, try using the "--debug" option to llvm-lit.

When debugging failures, the "-v" option will print to stdout the details of
the failure. Note that tests marked as "Expected Fail" (XFAIL) will not print
failure information, even with -v.

Customizing
===========
The tools lit and FileCheck are fairly flexible, and could be used to validate
more than just emitted bitcode. For example, with some changes to the testcases
and the helper shell-script rs-filecheck-wrapper.sh, it should be possible to
write tests that verify the emitted Java code.

Running
=======
To execute all the tests from this directory, use the Android llvm-lit tool
from libbcc:
$ ../../libbcc/tests/debuginfo/llvm-lit .

The tool can be run from any directory.
-j controls the number of parallel test executions
-v enables additional verbosity (useful when examining unexpected failures)

Adding new tests
================
To add new tests, just add .rs files to a test directory with similar
RUN/CHECK directives in comments as the existing tests.