Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 711460b

Browse files
author
Jorge Aparicio
authored
Merge pull request #4 from japaric/libc
use libc::mkfifo instead of the external mkfifo command
2 parents f58ef1c + 93455e2 commit 711460b

File tree

17 files changed

+662
-27
lines changed

17 files changed

+662
-27
lines changed

.travis.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
cache: cargo
2+
dist: trusty
3+
language: generic
4+
language: rust
5+
rust: stable
6+
services: docker
7+
sudo: required
8+
9+
env:
10+
global:
11+
- CRATE_NAME=itm
12+
- DEPLOY_VERSION=stable
13+
- TARGET=x86_64-unknown-linux-gnu
14+
15+
matrix:
16+
include:
17+
# OSX
18+
- env: TARGET=i686-apple-darwin
19+
os: osx
20+
- env: TARGET=x86_64-apple-darwin
21+
os: osx
22+
23+
# Linux
24+
- env: TARGET=i686-unknown-linux-gnu
25+
- env: TARGET=i686-unknown-linux-musl
26+
# This target is handled by the default build job
27+
# - env: TARGET=x86_64-unknown-linux-gnu
28+
- env: TARGET=x86_64-unknown-linux-musl
29+
30+
install:
31+
# curl: cargo + rustc
32+
# case: rust-std
33+
- if [ -z $TRAVIS_TAG ] || [ $TRAVIS_RUST_VERSION = $DEPLOY_VERSION ]; then
34+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y;
35+
source ~/.cargo/env;
36+
case $TARGET in
37+
x86_64-apple-darwin | x86_64-unknown-linux-gnu) ;;
38+
*) rustup target add $TARGET ;;
39+
esac;
40+
fi
41+
42+
script:
43+
# chmod: Travis can't cache files that are not readable by "others"
44+
- if [ -z $TRAVIS_TAG ] || [ $TRAVIS_RUST_VERSION = $DEPLOY_VERSION ]; then
45+
cargo generate-lockfile;
46+
47+
if [[ $TRAVIS_OS_NAME = linux ]]; then
48+
sh ci/run-docker.sh $TARGET || exit 1;
49+
else
50+
sh ci/run.sh || exit 1;
51+
fi;
52+
53+
chmod -R a+r $HOME/.cargo;
54+
fi
55+
56+
before_deploy:
57+
- sh ci/package.sh $TARGET
58+
59+
deploy:
60+
provider: releases
61+
api_key:
62+
secure: Muel87WKuZAv4Fc1QRc4LF2OQpbfdCkvZupA1ik/mBEHxbr8qpBJDLbq1BgNo6XB6RFjOglPEsf1yhxMwMdaNVymQOTTEbMZ29FAsthoH5F/PPpuMWTRB1DXqvwT9AzTaQhKmT1u4ZSxPpLqAOV0tT5Tdm3grSRt9UVlvSBjYo8A+KLWjPVOX88o7MLdbqHWQ8IbeS7nmrhO4eOXk4wgemDLdUPENhrHQb52oetMsaW+W3CZLkyNIYkQAZGpz2Vug1YrZMe+8heGDBuSAPBi0hI5Z9qYNN2Zpcp24XzVrr5KerKNwElPBbx5VyzX2bG1lkyKujRrt3Xl24xf4q0hZLYisTS2Cq5wNbIUvrVGc/y1UQ2sS2NRyVylMi5jryHBmqTc7TLvLrrXP/0SmxO6PeWoKMwcfLIbGmHWqtmp9Qo7hIqruSK6v+myNgUFmbyVsJlsB1Upo3eQ69B4XcG3uOD5kwvzo57lyzLxXDnvQk/v1Ygab8lFBeNr8dBiA3+RTaVblXSFKY1cQlPdg/AzkEXcz6xKda7y3gz530cgxL9f2Kx0YRwi6Bh9jBEA52CHFUF7UDiyPmGE+6rcYhpqIwvZ2nDQwLnxu+pV620ttYoXqK5FYDxPAVWuSe3A/F4KZzgAse0FFg0moOZTcurcrRSQfPT3EVqTO8xZi+Ou+kw=
63+
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*
64+
# don't delete the target directory
65+
skip_cleanup: true
66+
on:
67+
condition: $TRAVIS_RUST_VERSION = $DEPLOY_VERSION
68+
tags: true
69+
70+
cache:
71+
directories:
72+
- $HOME/.cargo
73+
- target
74+
75+
branches:
76+
only:
77+
# Release tags
78+
- /^v\d+\.\d+\.\d+.*$/
79+
- auto
80+
- try
81+
82+
notifications:
83+
email:
84+
on_success: never
85+
webhooks: https://homu.herokuapp.com/travis

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- `itmdump` no longer depends on the `mkfifo` command.
13+
1014
## v0.1.0 - 2016-10-03
1115

1216
### Added
1317

14-
- `itmdump` tool that parses instrumentation packets from the stimulus port 0 and dumps the payload
15-
to `stdout`.
18+
- `itmdump` tool that parses instrumentation packets from the stimulus port 0
19+
and dumps the payload to `stdout`.
1620

1721
[Unreleased]: https://github.com/japaric/itm/compare/v0.1.0...HEAD

Cargo.lock

Lines changed: 175 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ repository = "https://github.com/japaric/itm"
99
version = "0.1.0"
1010

1111
[dependencies]
12+
clap = "2.14.0"
13+
error-chain = "0.5.0"
14+
libc = "0.2.17"
1215
ref_slice = "1.1.0"
16+
17+
[dev-dependencies]
18+
tempdir = "0.3.5"

appveyor.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
environment:
2+
global:
3+
CRATE_NAME: itm
4+
DEPLOY_VERSION: stable
5+
RUST_VERSION: stable
6+
matrix:
7+
- TARGET: i686-pc-windows-gnu
8+
- TARGET: i686-pc-windows-msvc
9+
- TARGET: x86_64-pc-windows-gnu
10+
- TARGET: x86_64-pc-windows-msvc
11+
12+
install:
13+
- ps: ci\install.ps1
14+
15+
build: false
16+
17+
test_script:
18+
- if [%APPVEYOR_REPO_TAG%]==[false] (
19+
cargo build --target %TARGET% &&
20+
cargo build --target %TARGET% --release &&
21+
cargo test --target %TARGET% &&
22+
cargo test --target %TARGET% --release
23+
) else (
24+
if [%RUST_VERSION%]==[%DEPLOY_VERSION%] (
25+
cargo rustc --target %TARGET% --release --bin itmdump -- -C lto
26+
)
27+
)
28+
29+
before_deploy:
30+
- ps: ci\package.ps1
31+
32+
deploy:
33+
description: 'Windows release'
34+
artifact: /.*\.zip/
35+
auth_token:
36+
secure: bQ29dEXeNG5VP2hQcWiZ1xsfmkGosteCDNeYu/cXTX4lOeghOp0qANpQXmGfal29
37+
provider: GitHub
38+
on:
39+
# NOTE this "version" must match %DEPLOY_VERSION% (see top)
40+
RUST_VERSION: stable
41+
appveyor_repo_tag: true
42+
43+
cache:
44+
- C:\Users\appveyor\.cargo\registry
45+
- target
46+
47+
branches:
48+
only:
49+
# Release tags
50+
- /^v\d+\.\d+\.\d+.*$/
51+
- auto
52+
- try
53+
54+
notifications:
55+
- provider: Email
56+
on_build_success: false
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ubuntu:12.04
2+
RUN apt-get update
3+
RUN apt-get install -y --no-install-recommends \
4+
ca-certificates \
5+
gcc-multilib \
6+
git
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM ubuntu:16.04
2+
RUN apt-get update
3+
RUN apt-get install -y --no-install-recommends \
4+
ca-certificates \
5+
gcc-multilib \
6+
git \
7+
musl-tools
8+
ENV CARGO_TARGET_I686_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
9+
CC_i686_unknown_linux_musl=musl-gcc
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ubuntu:12.04
2+
RUN apt-get update
3+
RUN apt-get install -y --no-install-recommends \
4+
ca-certificates \
5+
gcc \
6+
git \
7+
libc6-dev
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:16.04
2+
RUN apt-get update
3+
RUN apt-get install -y --no-install-recommends \
4+
ca-certificates \
5+
gcc \
6+
git \
7+
libc6-dev \
8+
musl-tools

0 commit comments

Comments
 (0)