Skip to content

Commit

Permalink
Building in gcc:7 docker container, updated instructions. Could have …
Browse files Browse the repository at this point in the history
…typos, passing env variables to docker
  • Loading branch information
jwgrenning committed Nov 3, 2017
1 parent a291670 commit fb30e28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Prerequisites:
# CppUTest built with extensions
export CPPUTEST_HOME = $(PWD)/cpputest


all: cpputest
@echo CPPUTEST_HOME is $(CPPUTEST_HOME)
make -i -C code
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ With the ever changing C/C++ environments, it has been a challenge to keep
the TDD-EC code building. To make it easy to get started I'm using
Docker to take out the guess work.

A cool think about using Docker is that you don't have to install other
A cool thing about using Docker is that you don't have to install other
compilers on your system (except docker). The other compiler and tools
are hidden in the docker container.

Expand Down Expand Up @@ -55,9 +55,10 @@ From the mac, linux or cygwin command line (with docker running)
```
MOUNT_DIR=$PWD:/usr/src/mydir
WORKING_DIR=/usr/src/mydir
export CPPUTEST_HOME=$WORKING_DIR/cpputest
docker pull gcc:7
docker images
docker run -it -v $MOUNT_DIR -w $WORKING_DIR gcc:7 gcc -v
docker run -it -v $MOUNT_DIR -w $WORKING_DIR -e CPPUTEST_HOME gcc:7 gcc -v
```

####Build CppUTest and the TDD-EC book code
Expand All @@ -67,7 +68,8 @@ From the mac, linux or cygwin command line (with docker running)
```
MOUNT_DIR=$PWD:/usr/src/mydir
WORKING_DIR=/usr/src/mydir
docker run -it -v $MOUNT_DIR -w $WORKING_DIR gcc:7 make
export CPPUTEST_HOME=$WORKING_DIR/cpputest
docker run -it -v $MOUNT_DIR -w $WORKING_DIR -e CPPUTEST_HOME gcc:7 make
```

####Build any sub-project from a command line
Expand All @@ -77,13 +79,12 @@ From the mac, linux or cygwin command line (with docker running)
```
MOUNT_DIR=$PWD:/usr/src/mydir
WORKING_DIR=/usr/src/mydir
docker run -it -v $MOUNT_DIR -w $WORKING_DIR gcc:7 /bin/bash
docker run -it -v $MOUNT_DIR -w $WORKING_DIR -e CPPUTEST_HOME gcc:7 /bin/bash
```

From the docker container bash prompt

```
export CPPUTEST_HOME=$(pwd)/cpputest
cd code-t2
make
```
Expand Down

0 comments on commit fb30e28

Please sign in to comment.