From 64893ccc09b25ac31bc6a17f5c7f43c7fa789576 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Tue, 14 Jul 2009 16:31:56 -0700 Subject: remove amend Yank all the code to install OTA packages out of the recovery binary itself. Now packages are installed by a binary included in the package (run as a child of recovery), so we can make improvements in the installation process without waiting for a new release to use them. --- amend/tests/001-nop/expected.txt | 1 - amend/tests/001-nop/info.txt | 2 - amend/tests/001-nop/run | 17 --- amend/tests/002-lex-empty/SKIP | 0 amend/tests/002-lex-empty/expected.txt | 1 - amend/tests/002-lex-empty/info.txt | 1 - amend/tests/002-lex-empty/input | 0 amend/tests/002-lex-empty/run | 17 --- amend/tests/003-lex-command/expected.txt | 13 --- amend/tests/003-lex-command/info.txt | 1 - amend/tests/003-lex-command/input | 6 - amend/tests/003-lex-command/input2 | 1 - amend/tests/003-lex-command/input3 | 1 - amend/tests/003-lex-command/input4 | 1 - amend/tests/003-lex-command/run | 20 ---- amend/tests/004-lex-comment/expected.txt | 5 - amend/tests/004-lex-comment/info.txt | 1 - amend/tests/004-lex-comment/input | 4 - amend/tests/004-lex-comment/run | 17 --- amend/tests/005-lex-quoted-string/expected.txt | 13 --- amend/tests/005-lex-quoted-string/info.txt | 1 - amend/tests/005-lex-quoted-string/input | 5 - amend/tests/005-lex-quoted-string/input2 | 2 - amend/tests/005-lex-quoted-string/input3 | 2 - amend/tests/005-lex-quoted-string/run | 19 ---- amend/tests/006-lex-words/SKIP | 0 amend/tests/006-lex-words/expected.txt | 6 - amend/tests/006-lex-words/info.txt | 1 - amend/tests/006-lex-words/input | 5 - amend/tests/006-lex-words/input2 | 2 - amend/tests/006-lex-words/input3 | 2 - amend/tests/006-lex-words/run | 17 --- amend/tests/007-lex-real-script/expected.txt | 11 -- amend/tests/007-lex-real-script/info.txt | 1 - amend/tests/007-lex-real-script/input | 10 -- amend/tests/007-lex-real-script/run | 17 --- amend/tests/008-parse-real-script/expected.txt | 74 ------------ amend/tests/008-parse-real-script/info.txt | 1 - amend/tests/008-parse-real-script/input | 10 -- amend/tests/008-parse-real-script/run | 17 --- amend/tests/XXX-long-token/SKIP | 0 amend/tests/XXX-stack-overflow/SKIP | 0 amend/tests/one-test | 150 ------------------------- amend/tests/run-all-tests | 69 ------------ 44 files changed, 544 deletions(-) delete mode 100644 amend/tests/001-nop/expected.txt delete mode 100644 amend/tests/001-nop/info.txt delete mode 100644 amend/tests/001-nop/run delete mode 100644 amend/tests/002-lex-empty/SKIP delete mode 100644 amend/tests/002-lex-empty/expected.txt delete mode 100644 amend/tests/002-lex-empty/info.txt delete mode 100644 amend/tests/002-lex-empty/input delete mode 100644 amend/tests/002-lex-empty/run delete mode 100644 amend/tests/003-lex-command/expected.txt delete mode 100644 amend/tests/003-lex-command/info.txt delete mode 100644 amend/tests/003-lex-command/input delete mode 100644 amend/tests/003-lex-command/input2 delete mode 100644 amend/tests/003-lex-command/input3 delete mode 100644 amend/tests/003-lex-command/input4 delete mode 100644 amend/tests/003-lex-command/run delete mode 100644 amend/tests/004-lex-comment/expected.txt delete mode 100644 amend/tests/004-lex-comment/info.txt delete mode 100644 amend/tests/004-lex-comment/input delete mode 100644 amend/tests/004-lex-comment/run delete mode 100644 amend/tests/005-lex-quoted-string/expected.txt delete mode 100644 amend/tests/005-lex-quoted-string/info.txt delete mode 100644 amend/tests/005-lex-quoted-string/input delete mode 100644 amend/tests/005-lex-quoted-string/input2 delete mode 100644 amend/tests/005-lex-quoted-string/input3 delete mode 100644 amend/tests/005-lex-quoted-string/run delete mode 100644 amend/tests/006-lex-words/SKIP delete mode 100644 amend/tests/006-lex-words/expected.txt delete mode 100644 amend/tests/006-lex-words/info.txt delete mode 100644 amend/tests/006-lex-words/input delete mode 100644 amend/tests/006-lex-words/input2 delete mode 100644 amend/tests/006-lex-words/input3 delete mode 100644 amend/tests/006-lex-words/run delete mode 100644 amend/tests/007-lex-real-script/expected.txt delete mode 100644 amend/tests/007-lex-real-script/info.txt delete mode 100644 amend/tests/007-lex-real-script/input delete mode 100644 amend/tests/007-lex-real-script/run delete mode 100644 amend/tests/008-parse-real-script/expected.txt delete mode 100644 amend/tests/008-parse-real-script/info.txt delete mode 100644 amend/tests/008-parse-real-script/input delete mode 100644 amend/tests/008-parse-real-script/run delete mode 100644 amend/tests/XXX-long-token/SKIP delete mode 100644 amend/tests/XXX-stack-overflow/SKIP delete mode 100755 amend/tests/one-test delete mode 100755 amend/tests/run-all-tests (limited to 'amend/tests') diff --git a/amend/tests/001-nop/expected.txt b/amend/tests/001-nop/expected.txt deleted file mode 100644 index d4a85ceab..000000000 --- a/amend/tests/001-nop/expected.txt +++ /dev/null @@ -1 +0,0 @@ -I am a jelly donut. diff --git a/amend/tests/001-nop/info.txt b/amend/tests/001-nop/info.txt deleted file mode 100644 index 9942f10da..000000000 --- a/amend/tests/001-nop/info.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a sample no-op test, which does at least serve to verify that the -test harness is working. diff --git a/amend/tests/001-nop/run b/amend/tests/001-nop/run deleted file mode 100644 index 51637c147..000000000 --- a/amend/tests/001-nop/run +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -echo 'I am a jelly donut.' diff --git a/amend/tests/002-lex-empty/SKIP b/amend/tests/002-lex-empty/SKIP deleted file mode 100644 index e69de29bb..000000000 diff --git a/amend/tests/002-lex-empty/expected.txt b/amend/tests/002-lex-empty/expected.txt deleted file mode 100644 index 822a54c23..000000000 --- a/amend/tests/002-lex-empty/expected.txt +++ /dev/null @@ -1 +0,0 @@ - EOF diff --git a/amend/tests/002-lex-empty/info.txt b/amend/tests/002-lex-empty/info.txt deleted file mode 100644 index 090083fc6..000000000 --- a/amend/tests/002-lex-empty/info.txt +++ /dev/null @@ -1 +0,0 @@ -Test to make sure that an empty file is accepted properly. diff --git a/amend/tests/002-lex-empty/input b/amend/tests/002-lex-empty/input deleted file mode 100644 index e69de29bb..000000000 diff --git a/amend/tests/002-lex-empty/run b/amend/tests/002-lex-empty/run deleted file mode 100644 index 35c4a4fa3..000000000 --- a/amend/tests/002-lex-empty/run +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-lex input diff --git a/amend/tests/003-lex-command/expected.txt b/amend/tests/003-lex-command/expected.txt deleted file mode 100644 index e40db0c7c..000000000 --- a/amend/tests/003-lex-command/expected.txt +++ /dev/null @@ -1,13 +0,0 @@ - IDENTIFIER EOL - IDENTIFIER EOL - IDENTIFIER EOL - IDENTIFIER EOL - IDENTIFIER EOL -line 6: unexpected character at '1' - EOF -line 1: unexpected character at '"' - EOF -line 1: unexpected character at '=' - EOF -line 1: unexpected character at '9' - EOF diff --git a/amend/tests/003-lex-command/info.txt b/amend/tests/003-lex-command/info.txt deleted file mode 100644 index 929664855..000000000 --- a/amend/tests/003-lex-command/info.txt +++ /dev/null @@ -1 +0,0 @@ -Test to make sure that simple command names are tokenized properly. diff --git a/amend/tests/003-lex-command/input b/amend/tests/003-lex-command/input deleted file mode 100644 index b9ef231b0..000000000 --- a/amend/tests/003-lex-command/input +++ /dev/null @@ -1,6 +0,0 @@ -this_identifier_is_not_assert -NEITHER_IS_THIS_123 -but_the_next_one_is -assert -next_one_is_not_an_identifier -12not_an_identifier diff --git a/amend/tests/003-lex-command/input2 b/amend/tests/003-lex-command/input2 deleted file mode 100644 index eb5daf761..000000000 --- a/amend/tests/003-lex-command/input2 +++ /dev/null @@ -1 +0,0 @@ -"quoted" diff --git a/amend/tests/003-lex-command/input3 b/amend/tests/003-lex-command/input3 deleted file mode 100644 index f1c873878..000000000 --- a/amend/tests/003-lex-command/input3 +++ /dev/null @@ -1 +0,0 @@ -== diff --git a/amend/tests/003-lex-command/input4 b/amend/tests/003-lex-command/input4 deleted file mode 100644 index 3ad5abd03..000000000 --- a/amend/tests/003-lex-command/input4 +++ /dev/null @@ -1 +0,0 @@ -99 diff --git a/amend/tests/003-lex-command/run b/amend/tests/003-lex-command/run deleted file mode 100644 index 2e21fab03..000000000 --- a/amend/tests/003-lex-command/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-lex input -amend --debug-lex input2 -amend --debug-lex input3 -amend --debug-lex input4 diff --git a/amend/tests/004-lex-comment/expected.txt b/amend/tests/004-lex-comment/expected.txt deleted file mode 100644 index a728a5e70..000000000 --- a/amend/tests/004-lex-comment/expected.txt +++ /dev/null @@ -1,5 +0,0 @@ - IDENTIFIER EOL - IDENTIFIER EOL - EOL - EOL - EOF diff --git a/amend/tests/004-lex-comment/info.txt b/amend/tests/004-lex-comment/info.txt deleted file mode 100644 index 06912483b..000000000 --- a/amend/tests/004-lex-comment/info.txt +++ /dev/null @@ -1 +0,0 @@ -Test to make sure that comments are stripped out. diff --git a/amend/tests/004-lex-comment/input b/amend/tests/004-lex-comment/input deleted file mode 100644 index 6736c954c..000000000 --- a/amend/tests/004-lex-comment/input +++ /dev/null @@ -1,4 +0,0 @@ -comment_on_this_line # this is a "comment" (with / a bunch) # \\ of stuff \ -none_on_this_one -# beginning of line - # preceded by whitespace diff --git a/amend/tests/004-lex-comment/run b/amend/tests/004-lex-comment/run deleted file mode 100644 index 35c4a4fa3..000000000 --- a/amend/tests/004-lex-comment/run +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-lex input diff --git a/amend/tests/005-lex-quoted-string/expected.txt b/amend/tests/005-lex-quoted-string/expected.txt deleted file mode 100644 index 9bb5ac485..000000000 --- a/amend/tests/005-lex-quoted-string/expected.txt +++ /dev/null @@ -1,13 +0,0 @@ - IDENTIFIER WORD EOL - IDENTIFIER WORD EOL - IDENTIFIER WORD EOL - IDENTIFIER WORD EOL - IDENTIFIER WORD EOL - EOF - EOL - IDENTIFIERline 2: unterminated string at ' -' - ??? <0> - EOL - IDENTIFIERline 2: illegal escape at '\n' - ??? <0> diff --git a/amend/tests/005-lex-quoted-string/info.txt b/amend/tests/005-lex-quoted-string/info.txt deleted file mode 100644 index be458bd36..000000000 --- a/amend/tests/005-lex-quoted-string/info.txt +++ /dev/null @@ -1 +0,0 @@ -Test to make sure that quoted strings are tokenized properly. diff --git a/amend/tests/005-lex-quoted-string/input b/amend/tests/005-lex-quoted-string/input deleted file mode 100644 index 2b34bbcfa..000000000 --- a/amend/tests/005-lex-quoted-string/input +++ /dev/null @@ -1,5 +0,0 @@ -test "string" -test "string with spaces" -test "string with \"escaped\" quotes" -test "string with \\escaped\\ backslashes" -test "string with # a comment character" diff --git a/amend/tests/005-lex-quoted-string/input2 b/amend/tests/005-lex-quoted-string/input2 deleted file mode 100644 index 09e668957..000000000 --- a/amend/tests/005-lex-quoted-string/input2 +++ /dev/null @@ -1,2 +0,0 @@ -# This should fail -test1 "unterminated string diff --git a/amend/tests/005-lex-quoted-string/input3 b/amend/tests/005-lex-quoted-string/input3 deleted file mode 100644 index 02f3f8530..000000000 --- a/amend/tests/005-lex-quoted-string/input3 +++ /dev/null @@ -1,2 +0,0 @@ -# This should fail -test1 "string with illegal escape \n in the middle" diff --git a/amend/tests/005-lex-quoted-string/run b/amend/tests/005-lex-quoted-string/run deleted file mode 100644 index 7b1292a75..000000000 --- a/amend/tests/005-lex-quoted-string/run +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-lex input -amend --debug-lex input2 -amend --debug-lex input3 diff --git a/amend/tests/006-lex-words/SKIP b/amend/tests/006-lex-words/SKIP deleted file mode 100644 index e69de29bb..000000000 diff --git a/amend/tests/006-lex-words/expected.txt b/amend/tests/006-lex-words/expected.txt deleted file mode 100644 index a78a0b177..000000000 --- a/amend/tests/006-lex-words/expected.txt +++ /dev/null @@ -1,6 +0,0 @@ - IDENTIFIER WORD WORD WORD WORD WORD WORD WORD WORD EOL - IDENTIFIER WORD<12> WORD WORD WORD<)> WORD WORD WORD<\\> WORD WORD EOL - IDENTIFIER WORD WORD WORD WORD WORD WORD EOL - IDENTIFIER WORD WORD WORD EOL - IDENTIFIER WORD<"""shouldn't> WORD WORD WORD WORD EOL - EOF diff --git a/amend/tests/006-lex-words/info.txt b/amend/tests/006-lex-words/info.txt deleted file mode 100644 index dd3701607..000000000 --- a/amend/tests/006-lex-words/info.txt +++ /dev/null @@ -1 +0,0 @@ -Test to make sure that argument words are tokenized properly. diff --git a/amend/tests/006-lex-words/input b/amend/tests/006-lex-words/input deleted file mode 100644 index a4de63821..000000000 --- a/amend/tests/006-lex-words/input +++ /dev/null @@ -1,5 +0,0 @@ -test this has a bunch of BARE ALPHA WORDS -test 12 this has(some ) ALPHANUMER1C and \\ whatever characters -test this has mixed bare "and quoted" words -test what about quotes"in the middle?" -test \"\"\"shouldn't be a quoted string diff --git a/amend/tests/006-lex-words/input2 b/amend/tests/006-lex-words/input2 deleted file mode 100644 index 09e668957..000000000 --- a/amend/tests/006-lex-words/input2 +++ /dev/null @@ -1,2 +0,0 @@ -# This should fail -test1 "unterminated string diff --git a/amend/tests/006-lex-words/input3 b/amend/tests/006-lex-words/input3 deleted file mode 100644 index 02f3f8530..000000000 --- a/amend/tests/006-lex-words/input3 +++ /dev/null @@ -1,2 +0,0 @@ -# This should fail -test1 "string with illegal escape \n in the middle" diff --git a/amend/tests/006-lex-words/run b/amend/tests/006-lex-words/run deleted file mode 100644 index 35c4a4fa3..000000000 --- a/amend/tests/006-lex-words/run +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-lex input diff --git a/amend/tests/007-lex-real-script/expected.txt b/amend/tests/007-lex-real-script/expected.txt deleted file mode 100644 index 012f62c8d..000000000 --- a/amend/tests/007-lex-real-script/expected.txt +++ /dev/null @@ -1,11 +0,0 @@ - IDENTIFIER IDENTIFIER ( STRING ) == STRING<112345oldhashvalue1234123> EOL - IDENTIFIER WORD WORD EOL - IDENTIFIER WORD WORD EOL - IDENTIFIER IDENTIFIER ( STRING ) == STRING<667890newhashvalue6678909> EOL - IDENTIFIER WORD WORD EOL - IDENTIFIER EOL - IDENTIFIER IDENTIFIER ( STRING , STRING ) == STRING<112345oldhashvalue1234123> EOL - IDENTIFIER STRING == STRING EOL - IDENTIFIER IDENTIFIER ( STRING , IDENTIFIER ( STRING ) ) == STRING EOL - IDENTIFIER IDENTIFIER ( STRING ) == STRING<667890newhashvalue6678909> || IDENTIFIER ( STRING ) == STRING<667890newhashvalue6678909> EOL - EOF diff --git a/amend/tests/007-lex-real-script/info.txt b/amend/tests/007-lex-real-script/info.txt deleted file mode 100644 index 5e321f552..000000000 --- a/amend/tests/007-lex-real-script/info.txt +++ /dev/null @@ -1 +0,0 @@ -An input script similar to one that will actually be used in practice. diff --git a/amend/tests/007-lex-real-script/input b/amend/tests/007-lex-real-script/input deleted file mode 100644 index f3f1fd986..000000000 --- a/amend/tests/007-lex-real-script/input +++ /dev/null @@ -1,10 +0,0 @@ -assert hash_dir("SYS:") == "112345oldhashvalue1234123" -mark SYS: dirty -copy_dir "PKG:android-files" SYS: -assert hash_dir("SYS:") == "667890newhashvalue6678909" -mark SYS: clean -done -assert hash_dir("SYS:", "blah") == "112345oldhashvalue1234123" -assert "true" == "false" -assert one("abc", two("def")) == "five" -assert hash_dir("SYS:") == "667890newhashvalue6678909" || hash_dir("SYS:") == "667890newhashvalue6678909" diff --git a/amend/tests/007-lex-real-script/run b/amend/tests/007-lex-real-script/run deleted file mode 100644 index 35c4a4fa3..000000000 --- a/amend/tests/007-lex-real-script/run +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-lex input diff --git a/amend/tests/008-parse-real-script/expected.txt b/amend/tests/008-parse-real-script/expected.txt deleted file mode 100644 index dabf6d4e2..000000000 --- a/amend/tests/008-parse-real-script/expected.txt +++ /dev/null @@ -1,74 +0,0 @@ -command "assert" { - STRING EQ { - FUNCTION hash_dir ( - "SYS:" - ) - "112345oldhashvalue1234123" - } -} -command "mark" { - "SYS:" - "dirty" -} -command "copy_dir" { - "PKG:android-files" - "SYS:" -} -command "assert" { - STRING EQ { - FUNCTION hash_dir ( - "SYS:" - ) - "667890newhashvalue6678909" - } -} -command "mark" { - "SYS:" - "clean" -} -command "done" { -} -command "assert" { - STRING EQ { - FUNCTION hash_dir ( - "SYS:" - "blah" - ) - "112345oldhashvalue1234123" - } -} -command "assert" { - STRING EQ { - "true" - "false" - } -} -command "assert" { - STRING NE { - FUNCTION matches ( - FUNCTION hash_dir ( - "SYS:" - ) - "667890newhashvalue6678909" - "999999newhashvalue6678909" - ) - "" - } -} -command "assert" { - BOOLEAN OR { - STRING EQ { - FUNCTION hash_dir ( - "SYS:" - ) - "667890newhashvalue6678909" - } - STRING EQ { - FUNCTION hash_dir ( - "SYS:" - ) - "999999newhashvalue6678909" - } - } -} -amend: Parse successful. diff --git a/amend/tests/008-parse-real-script/info.txt b/amend/tests/008-parse-real-script/info.txt deleted file mode 100644 index 5e321f552..000000000 --- a/amend/tests/008-parse-real-script/info.txt +++ /dev/null @@ -1 +0,0 @@ -An input script similar to one that will actually be used in practice. diff --git a/amend/tests/008-parse-real-script/input b/amend/tests/008-parse-real-script/input deleted file mode 100644 index b07330695..000000000 --- a/amend/tests/008-parse-real-script/input +++ /dev/null @@ -1,10 +0,0 @@ -assert hash_dir("SYS:") == "112345oldhashvalue1234123" -mark SYS: dirty -copy_dir "PKG:android-files" SYS: -assert hash_dir("SYS:") == "667890newhashvalue6678909" -mark SYS: clean -done -assert hash_dir("SYS:", "blah") == "112345oldhashvalue1234123" -assert "true" == "false" -assert matches(hash_dir("SYS:"), "667890newhashvalue6678909", "999999newhashvalue6678909") != "" -assert hash_dir("SYS:") == "667890newhashvalue6678909" || hash_dir("SYS:") == "999999newhashvalue6678909" diff --git a/amend/tests/008-parse-real-script/run b/amend/tests/008-parse-real-script/run deleted file mode 100644 index 9544e1b9b..000000000 --- a/amend/tests/008-parse-real-script/run +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -amend --debug-ast input diff --git a/amend/tests/XXX-long-token/SKIP b/amend/tests/XXX-long-token/SKIP deleted file mode 100644 index e69de29bb..000000000 diff --git a/amend/tests/XXX-stack-overflow/SKIP b/amend/tests/XXX-stack-overflow/SKIP deleted file mode 100644 index e69de29bb..000000000 diff --git a/amend/tests/one-test b/amend/tests/one-test deleted file mode 100755 index 9cebd3f47..000000000 --- a/amend/tests/one-test +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Set up prog to be the path of this script, including following symlinks, -# and set up progdir to be the fully-qualified pathname of its directory. -prog="$0" -while [ -h "${prog}" ]; do - newProg=`/bin/ls -ld "${prog}"` - newProg=`expr "${newProg}" : ".* -> \(.*\)$"` - if expr "x${newProg}" : 'x/' >/dev/null; then - prog="${newProg}" - else - progdir=`dirname "${prog}"` - prog="${progdir}/${newProg}" - fi -done -oldwd=`pwd` -progdir=`dirname "${prog}"` -cd "${progdir}" -progdir=`pwd` -prog="${progdir}"/`basename "${prog}"` - -info="info.txt" -run="run" -expected="expected.txt" -output="out.txt" -skip="SKIP" - -dev_mode="no" -if [ "x$1" = "x--dev" ]; then - dev_mode="yes" - shift -fi - -update_mode="no" -if [ "x$1" = "x--update" ]; then - update_mode="yes" - shift -fi - -usage="no" -if [ "x$1" = "x--help" ]; then - usage="yes" -else - if [ "x$1" = "x" ]; then - testdir=`basename "$oldwd"` - else - testdir="$1" - fi - - if [ '!' -d "$testdir" ]; then - td2=`echo ${testdir}-*` - if [ '!' -d "$td2" ]; then - echo "${testdir}: no such test directory" 1>&2 - usage="yes" - fi - testdir="$td2" - fi -fi - -if [ "$usage" = "yes" ]; then - prog=`basename $prog` - ( - echo "usage:" - echo " $prog --help Print this message." - echo " $prog testname Run test normally." - echo " $prog --dev testname Development mode (dump to stdout)." - echo " $prog --update testname Update mode (replace expected.txt)." - echo " Omitting the test name uses the current directory as the test." - ) 1>&2 - exit 1 -fi - -td_info="$testdir"/"$info" -td_run="$testdir"/"$run" -td_expected="$testdir"/"$expected" -td_skip="$testdir"/"$skip" - -if [ -r "$td_skip" ]; then - exit 2 -fi - -tmpdir=/tmp/test-$$ - -if [ '!' '(' -r "$td_info" -a -r "$td_run" -a -r "$td_expected" ')' ]; then - echo "${testdir}: missing files" 1>&2 - exit 1 -fi - -# copy the test to a temp dir and run it - -echo "${testdir}: running..." 1>&2 - -rm -rf "$tmpdir" -cp -Rp "$testdir" "$tmpdir" -cd "$tmpdir" -chmod 755 "$run" - -#PATH="${progdir}/../build/bin:${PATH}" - -good="no" -if [ "$dev_mode" = "yes" ]; then - "./$run" 2>&1 - echo "exit status: $?" 1>&2 - good="yes" -elif [ "$update_mode" = "yes" ]; then - "./$run" >"${progdir}/$td_expected" 2>&1 - good="yes" -else - "./$run" >"$output" 2>&1 - cmp -s "$expected" "$output" - if [ "$?" = "0" ]; then - # output == expected - good="yes" - echo "$testdir"': succeeded!' 1>&2 - fi -fi - -if [ "$good" = "yes" ]; then - cd "$oldwd" - rm -rf "$tmpdir" - exit 0 -fi - -( - echo "${testdir}: FAILED!" - echo ' ' - echo '#################### info' - cat "$info" | sed 's/^/# /g' - echo '#################### diffs' - diff -u "$expected" "$output" - echo '####################' - echo ' ' - echo "files left in $tmpdir" -) 1>&2 - -exit 1 diff --git a/amend/tests/run-all-tests b/amend/tests/run-all-tests deleted file mode 100755 index c696bbd6c..000000000 --- a/amend/tests/run-all-tests +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2007 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Set up prog to be the path of this script, including following symlinks, -# and set up progdir to be the fully-qualified pathname of its directory. -prog="$0" -while [ -h "${prog}" ]; do - newProg=`/bin/ls -ld "${prog}"` - newProg=`expr "${newProg}" : ".* -> \(.*\)$"` - if expr "x${newProg}" : 'x/' >/dev/null; then - prog="${newProg}" - else - progdir=`dirname "${prog}"` - prog="${progdir}/${newProg}" - fi -done -oldwd=`pwd` -progdir=`dirname "${prog}"` -cd "${progdir}" -progdir=`pwd` -prog="${progdir}"/`basename "${prog}"` - -passed=0 -skipped=0 -skipNames="" -failed=0 -failNames="" - -for i in *; do - if [ -d "$i" -a -r "$i" ]; then - ./one-test "$i" - status=$? - if [ "$status" = "0" ]; then - ((passed += 1)) - elif [ "$status" = "2" ]; then - ((skipped += 1)) - skipNames="$skipNames $i" - else - ((failed += 1)) - failNames="$failNames $i" - fi - fi -done - -echo "passed: $passed test(s)" -echo "skipped: $skipped test(s)" - -for i in $skipNames; do - echo "skipped: $i" -done - -echo "failed: $failed test(s)" - -for i in $failNames; do - echo "failed: $i" -done -- cgit v1.2.3