From 47199ca13c29c1ec5937068aac086dce078808e0 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Thu, 9 Jan 2020 07:41:16 +0100 Subject: [PATCH] add negative tests rules --- src/passes/1-parser/pascaligo/dune | 25 +++++++++++++++++++++++++ src/test/dune | 5 +++++ 2 files changed, 30 insertions(+) diff --git a/src/passes/1-parser/pascaligo/dune b/src/passes/1-parser/pascaligo/dune index 66737b9c2..4e365191b 100644 --- a/src/passes/1-parser/pascaligo/dune +++ b/src/passes/1-parser/pascaligo/dune @@ -57,3 +57,28 @@ (preprocess (pps bisect_ppx --conditional)) (flags (:standard -open Simple_utils -open Parser_shared -open Parser_pascaligo))) + +;; Les deux directives (rule) qui suivent sont pour le dev local. +;; Il suffit de faire "dune build Parser.exe" pour avoir un Parser.exe dans le dossier. +;; Pour le purger, il faut faire "dune clean". +;(rule +; (targets Parser.exe) +; (deps ParserMain.exe) +; (action (copy ParserMain.exe Parser.exe)) +; (mode promote-until-clean)) + +;(rule +; (targets Lexer.exe) +; (deps LexerMain.exe) +; (action (copy LexerMain.exe Lexer.exe)) +; (mode promote-until-clean)) + +(rule + (targets Parser.msg) + (deps (:script_messages ../../../../vendors/ligo-utils/simple-utils/messages.sh) Parser.mly LexToken.mli ParToken.mly) + (action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly ))) + +(rule + (targets all.ligo) + (deps (:script_cover ../../../../vendors/ligo-utils/simple-utils/cover.sh) Parser.mly LexToken.mli ParToken.mly Parser.msg Unlexer.exe) + (action (run %{script_cover} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly --ext=ligo --unlexer=./Unlexer.exe --messages=Parser.msg --dir=. --concatenate Parser.mly ))) diff --git a/src/test/dune b/src/test/dune index b600a1fa3..8ddbde16b 100644 --- a/src/test/dune +++ b/src/test/dune @@ -20,6 +20,11 @@ (deps (source_tree ../../gitlab-pages/docs)) ) +(alias + (name parser-negative-tests) + (action (run ./parser_negative_tests.exe)) + (deps ../passes/1-parser/pascaligo/all.ligo)) + (alias (name ligo-test) (action (run ./test.exe))