Remove unneeded rbcrun features
- rblf_cli and rblf_env - -c and -f This is in preparation for making rbcrun able to function as a more general purpose starlark interpreter. Bug: 280685526 Test: go test, ./out/rbc ./build/make/tests/run.rbc, ./build/bazel/ci/rbc_dashboard.py --quick aosp_arm64 Change-Id: Ifff9ce7b4369422f39c5003bb85a168c78bde7cf
This commit is contained in:
11
tools/rbcrun/testdata/cli_and_env.star
vendored
11
tools/rbcrun/testdata/cli_and_env.star
vendored
@@ -1,11 +0,0 @@
|
||||
# Tests rblf_env access
|
||||
load("assert.star", "assert")
|
||||
|
||||
|
||||
def test():
|
||||
assert.eq(rblf_env.TEST_ENVIRONMENT_FOO, "test_environment_foo")
|
||||
assert.fails(lambda: rblf_env.FOO_BAR_BAZ, ".*struct has no .FOO_BAR_BAZ attribute$")
|
||||
assert.eq(rblf_cli.CLI_FOO, "foo")
|
||||
|
||||
|
||||
test()
|
9
tools/rbcrun/testdata/file_ops.star
vendored
9
tools/rbcrun/testdata/file_ops.star
vendored
@@ -1,22 +1,21 @@
|
||||
# Tests file ops builtins
|
||||
load("assert.star", "assert")
|
||||
|
||||
|
||||
def test():
|
||||
myname = "file_ops.star"
|
||||
files = rblf_wildcard("*.star")
|
||||
assert.true(myname in files, "expected %s in %s" % (myname, files))
|
||||
files = rblf_wildcard("*.star", rblf_env.TEST_DATA_DIR)
|
||||
files = rblf_wildcard("*.star")
|
||||
assert.true(myname in files, "expected %s in %s" % (myname, files))
|
||||
files = rblf_wildcard("*.xxx")
|
||||
assert.true(len(files) == 0, "expansion should be empty but contains %s" % files)
|
||||
mydir = "testdata"
|
||||
myrelname = "%s/%s" % (mydir, myname)
|
||||
files = rblf_find_files(rblf_env.TEST_DATA_DIR + "/../", "*")
|
||||
files = rblf_find_files("../", "*")
|
||||
assert.true(mydir in files and myrelname in files, "expected %s and %s in %s" % (mydir, myrelname, files))
|
||||
files = rblf_find_files(rblf_env.TEST_DATA_DIR + "/../", "*", only_files=1)
|
||||
files = rblf_find_files("../", "*", only_files=1)
|
||||
assert.true(mydir not in files, "did not expect %s in %s" % (mydir, files))
|
||||
assert.true(myrelname in files, "expected %s in %s" % (myrelname, files))
|
||||
files = rblf_find_files(rblf_env.TEST_DATA_DIR + "/../", "*.star")
|
||||
files = rblf_find_files("../", "*.star")
|
||||
assert.true(myrelname in files, "expected %s in %s" % (myrelname, files))
|
||||
test()
|
||||
|
4
tools/rbcrun/testdata/shell.star
vendored
4
tools/rbcrun/testdata/shell.star
vendored
@@ -1,5 +1,5 @@
|
||||
# Tests "queue" data type
|
||||
load("assert.star", "assert")
|
||||
|
||||
assert.eq("load.star shell.star", rblf_shell("cd %s && ls -1 shell.star load.star 2>&1" % rblf_env.TEST_DATA_DIR))
|
||||
assert.eq("shell.star", rblf_shell("cd %s && echo shell.sta*" % rblf_env.TEST_DATA_DIR))
|
||||
assert.eq("load.star shell.star", rblf_shell("ls -1 shell.star load.star 2>&1"))
|
||||
assert.eq("shell.star", rblf_shell("echo shell.sta*"))
|
||||
|
Reference in New Issue
Block a user