-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
218 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
|
||
dist_check_SCRIPTS = test0.sh \ | ||
test1.sh \ | ||
test2.sh \ | ||
test3.sh \ | ||
test4.sh \ | ||
test5.sh \ | ||
test6.sh | ||
|
||
TESTS = $(dist_check_SCRIPTS) | ||
|
||
EXTRA_DIST = \ | ||
empty/configure.ac \ | ||
empty/Makefile.am \ | ||
empty.lst \ | ||
anjuta/configure.ac \ | ||
anjuta.lst \ | ||
parser/configure.ac \ | ||
parser/Makefile.am \ | ||
parser.lst \ | ||
makefile/Makefile \ | ||
makefile.lst | ||
|
||
-include $(top_srcdir)/git.mk | ||
EXTRA_DIST = testsuite.at $(TESTSUITE_AT) $(srcdir)/package.m4 $(TESTSUITE) | ||
|
||
$(srcdir)/package.m4: $(top_srcdir)/configure.ac | ||
rm -f $@ $@.tmp | ||
{ \ | ||
echo '# Signature of the current package.'; \ | ||
echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \ | ||
echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \ | ||
echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \ | ||
echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \ | ||
echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \ | ||
} >[email protected] | ||
mv [email protected] $@ | ||
|
||
|
||
TESTSUITE_AT = \ | ||
$(srcdir)/empty.at \ | ||
$(srcdir)/anjuta.at \ | ||
$(srcdir)/group.at \ | ||
$(srcdir)/target.at \ | ||
$(srcdir)/parser.at \ | ||
$(srcdir)/makefile.at | ||
|
||
TESTSUITE = $(srcdir)/testsuite | ||
|
||
AUTOTEST = $(AUTOM4TE) --language=autotest | ||
$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 $(TESTSUITE_AT) | ||
$(AUTOTEST) -I $(srcdir) -o $@.tmp $@.at | ||
mv $@.tmp $@ | ||
|
||
clean-local: | ||
test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean | ||
|
||
check-local: atconfig $(TESTSUITE) | ||
$(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AT_SETUP([Load anjuta project]) | ||
AT_PARSER_CHECK([load $at_srcdir/anjuta \ | ||
list]) | ||
AT_CHECK([diff output $at_srcdir/anjuta.lst]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
AT_SETUP([Load empty project]) | ||
AS_MKDIR_P([empty]) | ||
AT_DATA([empty/configure.ac], | ||
[[AC_CONFIG_FILES(Makefile) | ||
]]) | ||
AT_DATA([empty/Makefile.am], | ||
[[ | ||
]]) | ||
AT_DATA([expect], | ||
[[ GROUP (0): empty | ||
]]) | ||
AT_PARSER_CHECK([load empty \ | ||
list]) | ||
AT_CHECK([diff output expect]) | ||
AT_CLEANUP |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
AT_SETUP([Add group]) | ||
AS_MKDIR_P([empty]) | ||
AT_DATA([empty/configure.ac], | ||
[[AC_CONFIG_FILES(Makefile) | ||
]]) | ||
AT_DATA([empty/Makefile.am], | ||
[[ | ||
]]) | ||
AT_DATA([expect], | ||
[[ GROUP (0): empty2 | ||
GROUP (0:0): group1 | ||
]]) | ||
AT_PARSER_CHECK([load empty \ | ||
move empty2 \ | ||
add group 0 group1 \ | ||
list \ | ||
save]) | ||
AT_CHECK([diff output expect]) | ||
AT_PARSER_CHECK([load empty2 \ | ||
list]) | ||
AT_CHECK([diff output expect]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# We want a recent Autotest | ||
m4_version_prereq([2.58]) | ||
|
||
# AT_PARSER_CHECK (PROJECTPARSER_ARG) | ||
# ------------------------------ | ||
# Run AT_CHECK on projectparser, ignoring stdout and stderr and putting the | ||
# result in a file named output | ||
m4_define([AT_PARSER_CHECK], | ||
[AT_CHECK([$abs_top_builddir/src/projectparser -o output] m4_quote($1), | ||
0, | ||
ignore, | ||
ignore)]) | ||
|
||
|
||
# Launch test suite | ||
#------------------ | ||
AT_INIT | ||
|
||
AT_TESTED([projectparser]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
AT_SETUP([Load makefile project]) | ||
AS_MKDIR_P([makefile]) | ||
AT_DATA([makefile/Makefile], | ||
[[## Created by Anjuta | ||
|
||
CC = gcc | ||
CFLAGS = -g -Wall | ||
OBJECTS = foo.o bar.o | ||
INCFLAGS = | ||
LDFLAGS = -Wl,-rpath,/usr/local/lib | ||
LIBS = | ||
|
||
all: foobar | ||
|
||
foobar: $(OBJECTS) | ||
$(CC) -o foobar $(OBJECTS) $(LDFLAGS) $(LIBS) | ||
|
||
.SUFFIXES: | ||
.SUFFIXES: .c .cc .C .cpp .o | ||
|
||
.c.o : | ||
$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS) | ||
|
||
count: | ||
wc *.c *.cc *.C *.cpp *.h *.hpp | ||
|
||
clean: | ||
rm -f *.o | ||
|
||
.PHONY: all | ||
.PHONY: count | ||
.PHONY: clean | ||
]]) | ||
AT_DATA([makefile/foo.c]) | ||
AT_DATA([makefile/bar.c]) | ||
AT_DATA([expect], | ||
[[ VARIABLE: CFLAGS = -g -Wall | ||
VARIABLE: OBJECTS = foo.o bar.o | ||
VARIABLE: LDFLAGS = -Wl,-rpath,/usr/local/lib | ||
VARIABLE: CC = gcc | ||
VARIABLE: LIBS = (null) | ||
VARIABLE: INCFLAGS = (null) | ||
GROUP (0): makefile | ||
TARGET (0:0): foobar | ||
SOURCE (0:0:0): foo.c | ||
SOURCE (0:0:1): bar.c | ||
]]) | ||
AT_PARSER_CHECK([load makefile \ | ||
list]) | ||
AT_CHECK([diff -b output expect]) | ||
AT_CLEANUP |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
AT_SETUP([Check configure parser]) | ||
AS_MKDIR_P([parser]) | ||
AT_DATA([parser/configure.ac], | ||
[[AC_CONFIG_FILES( | ||
Makefile) | ||
|
||
AC_OUTPUT | ||
]]) | ||
AT_DATA([parser/Makefile.am], | ||
[[ | ||
]]) | ||
AT_DATA([expect], | ||
[[ GROUP (0): parser | ||
]]) | ||
AT_PARSER_CHECK([load parser \ | ||
list]) | ||
AT_CHECK([diff output expect]) | ||
AT_CLEANUP |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
AT_SETUP([Add target]) | ||
AS_MKDIR_P([empty]) | ||
AT_DATA([empty/configure.ac], | ||
[[AC_CONFIG_FILES(Makefile) | ||
]]) | ||
AT_DATA([empty/Makefile.am], | ||
[[ | ||
]]) | ||
AT_DATA([expect], | ||
[[ GROUP (0): empty3 | ||
TARGET (0:0): target1 | ||
]]) | ||
AT_PARSER_CHECK([load empty \ | ||
move empty3 \ | ||
add target 0 target1 program \ | ||
list \ | ||
save]) | ||
AT_CHECK([diff output expect]) | ||
AT_PARSER_CHECK([load empty3 \ | ||
list]) | ||
AT_CHECK([diff output expect]) | ||
AT_CLEANUP |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.