Skip to content

Commit

Permalink
v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ldltools committed Mar 29, 2019
1 parent e20dca0 commit cff6d93
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v0.12.0rc
# v0.12.0 (2019-03.29)

- **new** [scxmlrun-all](tools/runall):
run several SCXML processes (along with generic MQTT processes) in parallel.
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# $Id: Makefile,v 1.1 2019/03/27 02:33:58 sato Exp sato $
# $Id: Makefile,v 1.2 2019/03/28 21:39:27 sato Exp $

PREFIX ?= /usr/local

SUBDIRS = src examples tests docs

all::
Expand All @@ -18,8 +17,12 @@ clean::
veryclean:: clean
rm -rf _build/*

# ================================================================================
# docker

DOCKER_REPO = ldltools/scxmlrun
#DOCKER_OPTS ?= -p 1883:1883 -p 9001:9001
DOCKER_OPTS ?=
SHELL := /bin/bash
VERSION = $(shell echo -e '\#include "src/version.hpp"\nSCXMLRUN_VERSION' | cpp -P | sed 's/\"//g')

Expand All @@ -33,7 +36,7 @@ $(DOCKER_REPO):
docker-build: docker-build-$(DOCKER_REPO)
docker-run: check-latest-$(DOCKER_REPO)
# docker run -it --rm $(DOCKER_REPO)
docker run -d --rm $(DOCKER_REPO) /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
docker run -d --rm $(DOCKER_OPTS) $(DOCKER_REPO) /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
container=$$(docker ps -l --format '{{.ID}}');\
docker exec -it $$container /bin/bash;\
docker exec $$container pkill mosquitto
Expand All @@ -57,6 +60,9 @@ check-latest-$(1):
endef
$(foreach repo,$(DOCKER_REPO)-dev $(DOCKER_REPO),$(eval $(call GENRULES,$(repo))))

# ================================================================================
# admin

#
tar: veryclean
(dir=`basename $$PWD`; cd ..; tar cvJf scxmlrun`date +%y%m%d`.tar.xz --exclude=.git --exclude=_build --exclude=RCS --exclude=obsolete $$dir)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ take a look at the [ping\_pong](examples/ping_pong/README.md) example.

To browse examples,
check out [this list](examples/README.md).
For the usage of _scxmlrun_, see [the man page](docs/man/scxmlrun.html)
For the usage of _scxmlrun_,
see [the man page](https://ldltools.github.io/docs/man/scxmlrun.html)
which will be accessible through `man scxmlrun` after installation.

# Installation on Docker

- run `make docker-build` to build a new docker image for scxmlrun
- run `make docker-run` to spawn a container and enter into it
- run `make docker-run` to spawn a container process and enter into it
- (in the container, try `make -C /root/tests test`)

# Installation on Debian/Ubuntu
Expand Down
3 changes: 0 additions & 3 deletions examples/vulnerable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ their monitors to detect their exploitation.
- [exploit](contracts/SimpleDAO_exploit.sol)
- [monitor]()

**Remark**
As of Solidity 0.5

## Transaction Order Dependence ([SWC-114](https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-114))

(to be filled in)
Expand Down
2 changes: 1 addition & 1 deletion src/version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef SCXMLRUN_VERSION_HPP
#define SCXMLRUN_VERSION_HPP
#define SCXMLRUN_VERSION "0.12.0rc"
#define SCXMLRUN_VERSION "0.12.0"
#endif
2 changes: 1 addition & 1 deletion tools/runall/src/runall_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ let main argc argv =
end;

(* exec script -- potentially dangerous *)
failwith "\"--exec\" is currently not supported";
(*failwith "\"--exec\" is currently not supported";*)
let temp_name, temp_ch = Filename.open_temp_file "runall" ".sh"
in
at_exit (fun _ -> Sys.remove temp_name);
Expand Down
4 changes: 2 additions & 2 deletions tools/runall/src/scripter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ let canonicalize (p : t) =
let preamble =
["set -eu -o pipefail";
"USER=${USER:-$(id -u -n)}";
"test $(pgrep -c -u $USER scxmlrun) -eq 0 || { echo \"scxml running\"; exit 1; }"]
"test $(pgrep -cx -u $USER scxmlrun) -eq 0 || { echo \"scxml running\"; exit 1; }"]

let postamble =
["while test $(pgrep -c -u $USER scxmlrun) -gt 0; do sleep 1s; done";
["while test $(pgrep -cx -u $USER scxmlrun) -gt 0; do sleep 1s; done";
"exit 0"]

let rec scriptize ?(verbose = false) oc (p : t) =
Expand Down

0 comments on commit cff6d93

Please sign in to comment.