Skip to content

Commit

Permalink
Merge pull request #65 from frenetic-lang/final-async
Browse files Browse the repository at this point in the history
Conflicts:
	_oasis
	_tags
	setup.ml
  • Loading branch information
seliopou committed Jan 10, 2014
2 parents 5f954f4 + b377b8a commit a1aa712
Show file tree
Hide file tree
Showing 44 changed files with 1,845 additions and 440 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ _build
.DS_Store
setup.data
setup.log
*~
*~
.*.sw[po]
._*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: c
script: bash -ex .travis-ci.sh
env:
global:
- OPAM_DEPENDS="lwt cstruct quickcheck ounit pa_ounit"
- CONFIG_FLAGS="--enable-tests --enable-quickcheck --enable-lwt"
- OPAM_DEPENDS="lwt cstruct quickcheck ounit pa_ounit textutils core async"
- CONFIG_FLAGS="--enable-tests --enable-quickcheck --enable-lwt --enable-async"
- FRENETIC_DEPENDS="ocaml-packet"
matrix:
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
Expand Down
50 changes: 22 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
# OASIS_START
# DO NOT EDIT (digest: 7b2408909643717852b95f994b273fee)
all: build

SETUP = ocaml setup.ml
LWT ?= $(shell if ocamlfind query lwt.unix >/dev/null 2>&1; then echo --enable-lwt; else echo --disable-lwt; fi)
ASYNC ?= $(shell if ocamlfind query async >/dev/null 2>&1; then echo --enable-async; else echo --disable-async; fi)
# Implies --enable-quickcheck
TESTS ?= $(shell if ocamlfind query quickcheck >/dev/null 2>&1; then echo --enable-tests; else echo --disable-tests; fi)

build: setup.data
$(SETUP) -build $(BUILDFLAGS)
NAME=openflow
J=4

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)
setup.ml: _oasis
oasis setup

test: setup.data build
$(SETUP) -test $(TESTFLAGS)
setup.data: setup.ml
ocaml setup.ml -configure $(LWT) $(ASYNC) $(TESTS)

all:
$(SETUP) -all $(ALLFLAGS)
build: setup.data setup.ml
ocaml setup.ml -build -j $(J)

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
install: setup.data setup.ml
ocaml setup.ml -install

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)
test: setup.ml build
_build/test/Test.byte inline-test-runner openflow

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
reinstall: setup.ml
ocamlfind remove $(NAME) || true
ocaml setup.ml -reinstall

clean:
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP
ocamlbuild -clean
rm -f setup.data setup.log
98 changes: 67 additions & 31 deletions _oasis
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ Synopsis: Serialization library for OpenFlow
Authors: Marco Canini, Nate Foster, Arjun Guha, Mark Reitblatt,
Cole Schlesinger, and Laurent Vanbever
License: LGPL
Plugins: META (0.3), DevFiles (0.3)
Plugins: META (0.3)
BuildTools:
ocamlbuild,
ocamldoc
ocamlbuild

Flag quickcheck
Description: build the openflow.quickcheck library
Expand All @@ -23,13 +22,20 @@ Flag end_test
Description: install executable for end-to-end test
Default: false

Flag async
Description: build the openflow.async library
Default: false

Library openflow
Path: lib
BuildDepends:
str,
cstruct,
cstruct.syntax,
packet
packet,
core,
sexplib.syntax,
threads
InternalModules:
Bits,
Misc,
Expand All @@ -40,13 +46,39 @@ Library openflow
HighLevelSwitch_common
Modules:
VInt,
OpenFlow_Header,
OpenFlow0x01,
OpenFlow0x01_Core,
OpenFlow0x01_Stats,
OpenFlow0x04,
OpenFlow0x04_Core,
SDN_Types

Library async
Findlibparent: openflow
Findlibname: async
Path: async
Build$: flag(async)
BuildDepends:
async,
openflow,
cstruct.async,
threads,
textutils,
sexplib.syntax
InternalModules:
Async_OpenFlow_Log,
Async_OpenFlow_Message,
Async_OpenFlow_Platform,
Async_OpenFlow_ClientServer,
Async_OpenFlow0x01,
Async_OpenFlow0x04,
Async_OpenFlowChunk,
Async_Highlevel
Modules:
Async_OpenFlow


Library lwt
Findlibparent: openflow
Findlibname: lwt
Expand Down Expand Up @@ -76,33 +108,18 @@ Library quickcheck
Findlibparent: openflow
Findlibname: quickcheck
Path: quickcheck
Build$: flag(quickcheck)
Build$: flag(tests) || flag(quickcheck)
BuildDepends:
quickcheck,
openflow
Modules:
OpenFlow_Arbitrary,
OpenFlow0x01_Arbitrary

Document doc
Title: OpenFlow documentation
Type: OCamlbuild (0.3)
XOCamlBuildPath: lib
XOCamlBuildModules:
OpenFlow0x01,
OpenFlow0x01_Core,
OpenFlow0x01_Stats,
OpenFlow0x01_Switch,
OpenFlow0x01_TxSwitch,
OpenFlow0x01_Platform,
OpenFlow0x04,
OpenFlow0x04_Core,
OpenFlow0x04_Platform,
OpenFlow0x04_Misc

Executable testtool
Path: test
Install: false
Build$: flag(quickcheck) && flag(tests)
Install: False
Build$: flag(tests)
MainIs: Test.ml
BuildDepends:
packet,
Expand All @@ -114,13 +131,6 @@ Executable testtool
openflow.quickcheck,
quickcheck

Executable test0
Path: test
Install$: false
Build$: flag(tests) && flag(lwt)
MainIs: Test0.ml
BuildDepends: packet,openflow,openflow.lwt,oUnit,pa_ounit,pa_ounit.syntax

Executable ping_test
Path: test
Install$: false
Expand All @@ -129,6 +139,32 @@ Executable ping_test
BuildDepends: packet,openflow,openflow.lwt,oUnit,pa_ounit,pa_ounit.syntax

Test all_tests
Command: $testtool inline-test-runner dummy
Command: $testtool inline-test-runner openflow
Run$: flag(quickcheck) && flag(tests)
TestTools: testtool

Executable Hypervisor
Path: examples
MainIs: Hypervisor.ml
Install: False
BuildDepends:
threads,
core,
async,
packet,
cstruct.async,
openflow,
openflow.async

Executable learning_switch
Path: examples
MainIs: Learning_Switch.ml
Install: false
BuildDepends:
threads,
core,
async,
packet,
cstruct.async,
openflow,
openflow.async
Loading

0 comments on commit a1aa712

Please sign in to comment.