Skip to content
Snippets Groups Projects
Commit 30fbbdb8 authored by xleroy's avatar xleroy
Browse files

No crash if nonexistent input file.

Heuristic to choose test data.


git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1509 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
parent f7cc6f0b
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,13 @@ LZSS_OBJS=$(COMMON_OBJS) lzvars.o lzhash.o lzencode.o lzdecode.o lzssmain.o
lzss: $(LZSS_OBJS)
$(CC) $(CFLAGS) -o $@ $(LZSS_OBJS) $(LIBS)
TESTFILE=/mach_kernel
TESTFILE:=$(firstword $(wildcard /mach_kernel) $(wildcard /boot/vmlinuz) ./lzss)
TESTCOMPR=/tmp/testcompr.out
TESTEXPND=/tmp/testexpnd.out
test:
rm -f $(TESTCOMPR) $(TESTEXPND)
@echo "Test data: $(TESTFILE)"
@for i in $(EXE); do \
echo "$$i: compression..."; \
./$$i -c -i $(TESTFILE) -o $(TESTCOMPR); \
......
......@@ -162,7 +162,7 @@ bit_file_t *BitFileOpen(const char *fileName, const BF_MODES mode)
{
/* fopen failed */
free(bf);
bf = NULL;
return NULL;
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment