Skip to content
Snippets Groups Projects
Commit fa40e935 authored by nimrod's avatar nimrod
Browse files

- Added lint target, updated documentation.

parent e0c1e9d7
No related branches found
No related tags found
No related merge requests found
.PHONY: test clean .PHONY: test clean lint
lint:
/bin/sh -en bundle_certs
clean: clean:
if [ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ]; then kill "$$(cat .server.pid)"; fi if [ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ]; then kill "$$(cat .server.pid)"; fi
...@@ -49,7 +52,7 @@ clean: ...@@ -49,7 +52,7 @@ clean:
.testcerts/bundle.crt: .testcerts/intermediates.crt .testcerts/server.crt .testcerts/bundle.crt: .testcerts/intermediates.crt .testcerts/server.crt
./bundle_certs .testcerts/* > .testcerts/bundle.crt ./bundle_certs .testcerts/* > .testcerts/bundle.crt
test: .testcerts/bundle.crt .testcerts/root.crt .testcerts/server.key test: lint .testcerts/bundle.crt .testcerts/root.crt .testcerts/server.key
openssl s_server -cert .testcerts/bundle.crt -key .testcerts/server.key -quiet -www -no_dhe & echo "$$!" > .server.pid openssl s_server -cert .testcerts/bundle.crt -key .testcerts/server.key -quiet -www -no_dhe & echo "$$!" > .server.pid
test "$$(curl --fail --cacert .testcerts/root.crt --write-out '%{ssl_verify_result}' --silent --output /dev/null https://localhost:4433)" = "0" test "$$(curl --fail --cacert .testcerts/root.crt --write-out '%{ssl_verify_result}' --silent --output /dev/null https://localhost:4433)" = "0"
if [ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ]; then kill "$$(cat .server.pid)"; fi if [ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ]; then kill "$$(cat .server.pid)"; fi
......
...@@ -55,17 +55,12 @@ Shell functions ...@@ -55,17 +55,12 @@ Shell functions
subject hash). subject hash).
- bundle_certs: See Usage section above. - bundle_certs: See Usage section above.
Development
-----------
Testing To ease development :code:`make clean`, :code:`make lint` and :code:`make test`
------- are available. It's recommended to add :code:`make lint` and :code:`make test`
to to your Git pre-commit and pre-push hooks accourdingly.
Simply run:
.. code:: shell
make test
I suggest adding the test as a pre-push Git hook since it is quite fast.
License License
------- -------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment