summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-13 14:06:11 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-13 14:06:11 +0200
commit2414d0b7099fd24ab31202e34381759db20917d8 (patch)
tree20278a4ce617d14ad18819c176d5f355d0109a36 /Makefile
parentf2966a5584e200f3f9586995c6c0480ed7f00dd3 (diff)
downloadpgfuse-2414d0b7099fd24ab31202e34381759db20917d8.tar.gz
pgfuse-2414d0b7099fd24ab31202e34381759db20917d8.tar.bz2
added a fsync/fdatasync test
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 865054a..25ebe45 100644
--- a/Makefile
+++ b/Makefile
@@ -21,9 +21,10 @@ LDFLAGS = `pkg-config fuse --libs` -lpq
clean:
rm -f pgfuse pgfuse.o pgsql.o
+ rm -f testfsync testfsync.o
psql < clean.sql
-test: pgfuse
+test: pgfuse testfsync
psql < clean.sql
psql < schema.sql
test -d mnt || mkdir mnt
@@ -52,13 +53,24 @@ test: pgfuse
-rmdir mnt/dir
# expect fail (not a directory)
-rmdir mnt/dir/dir2/bfile
+ # test fdatasync and fsync
+ ./testfsync
+ sleep 2
fusermount -u mnt
pgfuse: pgfuse.o pgsql.o
- gcc -o pgfuse pgfuse.o pgsql.o $(LDFLAGS)
+ $(CC) -o pgfuse pgfuse.o pgsql.o $(LDFLAGS)
pgfuse.o: pgfuse.c pgsql.h
- gcc -c $(CFLAGS) -o pgfuse.o pgfuse.c
+ $(CC) -c $(CFLAGS) -o pgfuse.o pgfuse.c
pgsql.o: pgsql.c pgsql.h
- gcc -c $(CFLAGS) -o pgsql.o pgsql.c
+ $(CC) -c $(CFLAGS) -o pgsql.o pgsql.c
+
+testfsync: testfsync.o
+ $(CC) -o testfsync testfsync.o
+
+testfsync.o: testfsync.c
+ $(CC) -c $(CFLAGS) -o testfsync.o testfsync.c
+
+