Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tessro authored and mikejs committed Aug 22, 2010
1 parent f1095a0 commit 99a1f88
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.o
*.a

mount-gridfs
mount_gridfs
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
CC=g++
CCOPTS=-D_FILE_OFFSET_BITS=64 -I. -I/usr/local/include
LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
CCOPTS=-g -I. -I/usr/local/include
LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse_ino64 -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt

mount_gridfs : operations.o local_gridfile.o main.o options.o
$(CC) $(LDOPTS) -o mount_gridfs main.o operations.o options.o local_gridfile.o

operations.o :
operations.o : operations.cpp operations.h
$(CC) $(CCOPTS) -c operations.cpp

local_gridfile.o :
local_gridfile.o : local_gridfile.cpp local_gridfile.h
$(CC) $(CCOPTS) -c local_gridfile.cpp

main.o :
main.o : main.cpp
$(CC) $(CCOPTS) -c main.cpp

options.o :
options.o : options.cpp options.h
$(CC) $(CCOPTS) -c options.cpp

clean:
rm -f mount_gridfs main.o operations.o options.o local_gridfile.o
1 change: 1 addition & 0 deletions operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef __OPERATIONS_H
#define __OPERATIONS_H

#define _FILE_OFFSET_BITS 64
#define FUSE_USE_VERSION 26

#include <fuse.h>
Expand Down
6 changes: 3 additions & 3 deletions tests/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setUp(self):

# wait for mount to complete
time.sleep(1)

def tearDown(self):
for filename in glob.iglob(os.path.join(self.mount, '*')):
os.remove(filename)
Expand All @@ -29,11 +29,11 @@ def tearDown(self):
subprocess.check_call(['umount', self.mount])

os.rmdir(self.mount)

def test_read_write(self):
with open(os.path.join(self.mount, 'testfile.txt'), 'w') as w:
w.write("This is a test of GridFS FUSE.")

with open(os.path.join(self.mount, 'testfile.txt'), 'r') as r:
self.assertEqual("This is a test of GridFS FUSE.",
r.read())
Expand Down

0 comments on commit 99a1f88

Please sign in to comment.