mps

morphux package server
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/mps

commit bfb35a605920f76e81794bd2c242b0bec7bea2b6
parent e463ad89880f76ba1d8f1509d7bc24b328c91726
Author: MrGosti <gostitsog@gmail.com>
Date:   Thu, 13 Apr 2017 17:09:32 +0200

Merge branch 'dev' of https://github.com/Morphux/mps into dev

Diffstat:
M.gitignore | 5+++++
A.gitmodules | 3+++
A.travis.yml | 12++++++++++++
MMakefile | 9++++++---
MREADME.md | 13+++++++++----
Alaunch_test.sh | 15+++++++++++++++
Rmps.go -> main.go | 0
Atests | 1+
8 files changed, 51 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -22,3 +22,7 @@ _testmain.go *.exe *.test *.prof + + +# MPS BINARY +mps+ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tests"] + path = tests + url = https://github.com/Morphux/Protocol diff --git a/.travis.yml b/.travis.yml @@ -0,0 +1,12 @@ +language: go +dist: trusty + +before_install: + - sudo apt-get -qq update + - sudo apt-get install -y autopoint flex gettext + +install: + - go get github.com/mattn/go-sqlite3 + +script: + - make build test diff --git a/Makefile b/Makefile @@ -9,7 +9,7 @@ VERSION := 1.0.0 BUILD := `git rev-parse HEAD` # Use linker flags to provide version/build settings to the target -LDFLAGS=-ldflags "-X=main.Version=$(VERSION) -X=main.Build=$(BUILD)" +LDFLAGS= # go source files, ignore vendor directory SRC = $(shell find . -type f -name '*.go' -not -path "./vendors/*") @@ -44,5 +44,9 @@ check: @for d in $$(go list ./... | grep -v /vendors/); do golint $${d}; done @go tool vet ${SRC} +test: $(TARGET) + make -C tests init all + ./launch_test.sh + run: install - @$(TARGET)- \ No newline at end of file + @$(TARGET) diff --git a/README.md b/README.md @@ -4,7 +4,7 @@ <p align="center"> <img src="https://img.shields.io/badge/language-go-blue.svg" /> &nbsp; <img src="https://img.shields.io/badge/license-Apache--2.0-yellow.svg" /> &nbsp; -<!--<a href="https://travis-ci.org/Morphux/libmpm"><img src="https://travis-ci.org/Morphux/libmpm.svg?branch=master"/></a> &nbsp;--> +<a href="https://travis-ci.org/Morphux/mps"><img src="https://travis-ci.org/Morphux/mps.svg?branch=master"/></a> &nbsp; <!--<a href="https://scan.coverity.com/projects/morphux-libmpm"> <img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/11577/badge.svg"/> @@ -20,19 +20,24 @@ <a href="#install">Install</a> • <a href="#test">Test</a> • <a href="#use">Use</a> • <a href="#documentation">Documentation</a> </p> +# Clone +``` +git clone https://github.com/Morphux/mps --recursive +``` + # Install You need to have a correct [GOPATH](https://golang.org/doc/code.html#GOPATH) ``` go get -u github.com/Morphux/mps - ``` # Test - -### Not written yet +``` +make test +``` # Use diff --git a/launch_test.sh b/launch_test.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +DB="mock3.db" +IP="127.0.0.1" +PORT="6666" + + +./mps -db=./test_database/${DB} ${IP}:${PORT} & +MPS_PID=$! +sleep 2; +echo ${MPS_PID} +./tests/protocol_tests -a ${IP} -p ${PORT} -d test_database/${DB} client +RET=$? +kill ${MPS_PID} +exit ${RET}; diff --git a/mps.go b/main.go diff --git a/tests b/tests @@ -0,0 +1 @@ +Subproject commit b5c9adc2b1eec6f87a97684507d48ff02e508ab5