Skip to content

Commit

Permalink
Makefile changes to compile any generated workload in a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jayashreemohan29 committed Sep 24, 2018
1 parent 3f206e6 commit ef6e519
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ all: $(SUBDIRS)
tests:
$(MAKE) -C $(CODEDIR) tests

seq1:
$(MAKE) -C $(CODEDIR) seq1

gentests:
$(MAKE) -C $(CODEDIR) gentests

permuters:
$(MAKE) -C $(CODEDIR) permuters

Expand Down
5 changes: 3 additions & 2 deletions ace/ace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def doPermutation(perm):
usedFiles = flatList(set(usedFiles))

#For lower sequences, let's allow fsync on any related file - sibling/parent
if int(num_ops) < 3:
if int(num_ops) < 3 and not demo:
syncPermutationsCustom = buildCustomTuple(file_range(usedFiles))
else:
syncPermutationsCustom = buildCustomTuple(usedFiles)
Expand Down Expand Up @@ -1315,14 +1315,15 @@ def main():
OperationSet = ['link','falloc']
FallocOptions = ['FALLOC_FL_ZERO_RANGE|FALLOC_FL_KEEP_SIZE']
FileOptions = ['A/foo']
SecondFileOptions = ['A/bar']
SecondFileOptions = ['B/bar']

else:
demo = False

# In case the user requests for an additional level of nesting, add one nested dir A/C and one file within it A/C/foo.
if nested:
FileOptions = FileOptions + ['AC/foo']
SecondFileOptions = SecondFileOptions + ['AC/bar']
SecondDirOptions = SecondDirOptions + ['AC']

# We just print all known bugs
Expand Down
42 changes: 39 additions & 3 deletions code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,15 @@ CM_SEQ1_OUT = \
$(foreach TEST, $(CM_SEQ1), \
$(BUILD_DIR)/tests/seq1/$(TEST))

CM_TESTS_EXCLUDE = BaseTestCase.cpp
CM_TESTS = \

CM_GEN_EXCLUDE = base.cpp
CM_GEN = \
$(patsubst %.cpp, %.so, \
$(filter-out $(CM_GEN_EXCLUDE), \
$(notdir $(wildcard $(CURDIR)/tests/generated_workloads/*.cpp))))
CM_GEN_OUT = \
$(foreach TEST, $(CM_GEN), \
$(BUILD_DIR)/tests/generated_workloads/$(TEST))


CM_TESTS_EXCLUDE = BaseTestCase.cpp
Expand All @@ -109,6 +116,7 @@ all: \
c_harness \
user_tools \
tests \
seq1 \
permuters

modules: \
Expand All @@ -127,9 +135,14 @@ user_tools: \

tests: \
$(foreach TEST, $(CM_TESTS), $(BUILD_DIR)/tests/$(TEST)) \
$(CM_GEN_042_OUT) \
$(CM_GEN_042_OUT)

seq1: \
$(CM_SEQ1_OUT)

gentests: \
$(CM_GEN_OUT)

permuters: \
$(foreach PERMUTER, $(CM_PERMUTERS), $(BUILD_DIR)/permuter/$(PERMUTER))

Expand Down Expand Up @@ -181,6 +194,12 @@ $(BUILD_DIR)/tests/seq1/%.o: %.cpp
mkdir -p $(@D)
$(GPP) $(GOPTS) -fPIC -c -o $@ $<


$(BUILD_DIR)/tests/generated_workloads/%.o: %.cpp
mkdir -p $(@D)
$(GPP) $(GOPTS) -fPIC -c -o $@ $<


# For static pattern rules like the one below, the pattern and prereqs must be
# separated by ' :' including the space!
$(CM_GEN_042_OUT): $(BUILD_DIR)/tests/generic_042/%.so : \
Expand Down Expand Up @@ -215,6 +234,23 @@ $(CM_SEQ1_OUT): $(BUILD_DIR)/tests/seq1/%.so : \
$(GPP) $(GOPTS) $(GOTPSSO) $(XATTR_DEF_FLAG) -Wl,-soname,$(notdir $@) \
-o $@ $^


$(CM_GEN_OUT): $(BUILD_DIR)/tests/generated_workloads/%.so : \
tests/generated_workloads/%.cpp \
$(BUILD_DIR)/tests/BaseTestCase.o \
$(BUILD_DIR)/user_tools/src/actions.o \
$(BUILD_DIR)/user_tools/src/wrapper.o \
$(BUILD_DIR)/user_tools/src/workload.o \
$(BUILD_DIR)/utils/DiskMod.o \
$(BUILD_DIR)/utils/communication/BaseSocket.o \
$(BUILD_DIR)/utils/communication/ClientSocket.o \
$(BUILD_DIR)/utils/communication/ClientCommandSender.o \
$(BUILD_DIR)/results/DataTestResult.o
mkdir -p $(@D)
$(GPP) $(GOPTS) $(GOTPSSO) $(XATTR_DEF_FLAG) -Wl,-soname,$(notdir $@) \
-o $@ $^


$(BUILD_DIR)/tests/%.so: \
tests/%.cpp \
$(BUILD_DIR)/tests/BaseTestCase.o \
Expand Down
4 changes: 3 additions & 1 deletion code/tests/ace-base/base-j-lang
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ test
A
A/C
B
foo
bar
A/foo
A/bar
B/foo
Expand All @@ -13,4 +15,4 @@ A/C/bar
# declare
local_checkpoint

# setup
# setup

0 comments on commit ef6e519

Please sign in to comment.