[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs c4c2fbfa6f 347/472: Merge branch 'master' into unt
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs c4c2fbfa6f 347/472: Merge branch 'master' into unterrified-original-possition-171 |
Date: |
Thu, 6 Jan 2022 21:59:38 -0500 (EST) |
branch: elpa/pacmacs
commit c4c2fbfa6f006e6b5523e4eec723f773e85bee2f
Merge: 49292e34d3 ffc0195b9a
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Merge branch 'master' into unterrified-original-possition-171
We need the `att.el` from #176 here
---
tools/README.md | 10 +++++--
tools/att.el | 17 +++++++++++
tools/{it-recorder.el => pacmacs-rr.el} | 53 +++++++++++++++++++++++++++++----
3 files changed, 72 insertions(+), 8 deletions(-)
diff --git a/tools/README.md b/tools/README.md
index a19b055937..299e60f774 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -2,11 +2,17 @@
Tools that help to develop the game
+## att.el ##
+
+Runs `./it-cases/it-case03.el` it case using `pacmacs-rr` module and
+outputs the ATT to `./att.txt` file.
+
## compile.el ##
Compiles all the source code, treats warnings as errors and exits with
non-zero exit code on any error (which `cask build` does not yet).
-## it-recorder.el ##
+## pacmacs-rr.el ##
-Tool for recording and replaying integration test cases.
+RR stands for Record and Replay. Additional module for recording and
+replaying integration test cases.
diff --git a/tools/att.el b/tools/att.el
new file mode 100644
index 0000000000..8a3902c68e
--- /dev/null
+++ b/tools/att.el
@@ -0,0 +1,17 @@
+(add-to-list 'load-path default-directory)
+(add-to-list 'load-path (concat default-directory "/tools/"))
+
+(require 'pacmacs-rr)
+(require 'f)
+
+(defconst att-result-file-path "./att.txt")
+(defvar att-it-case-path "./it-cases/it-case03.el")
+
+(defun att-replayer-finished ()
+ (f-write (format "Average Tick Time: %fms" (pacmacs--average-tick-time))
+ 'utf-8
+ att--result-file-path)
+ (kill-emacs 0))
+
+(add-hook 'pacmacs-replay-finished-hook #'performance-replayer-finished)
+(pacmacs--start-it-replayer att-it-case-path)
diff --git a/tools/it-recorder.el b/tools/pacmacs-rr.el
similarity index 56%
rename from tools/it-recorder.el
rename to tools/pacmacs-rr.el
index fa5a73bf9e..b673e112e4 100644
--- a/tools/it-recorder.el
+++ b/tools/pacmacs-rr.el
@@ -1,3 +1,38 @@
+;;; pacmacs-rr.el --- Pacman for Emacs -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Codingteam
+
+;; Author: Codingteam <codingteam@conference.jabber.ru>
+;; Maintainer: Alexey Kutepov <reximkut@gmail.com>
+;; URL: http://github.com/rexim/pacmacs.el
+
+;; Permission is hereby granted, free of charge, to any person
+;; obtaining a copy of this software and associated documentation
+;; files (the "Software"), to deal in the Software without
+;; restriction, including without limitation the rights to use, copy,
+;; modify, merge, publish, distribute, sublicense, and/or sell copies
+;; of the Software, and to permit persons to whom the Software is
+;; furnished to do so, subject to the following conditions:
+
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+;; SOFTWARE.
+
+;;; Commentary:
+
+;; Additional module for recording and replaying integration test
+;; cases.
+
+;;; Code:
+
(require 'pacmacs)
(require 'dash)
@@ -7,6 +42,7 @@
(defvar pacmacs--tick-counter 0)
(defvar pacmacs--recorded-actions nil)
(defvar pacmacs--tick-times nil)
+(defvar pacmacs-replay-finished-hook nil)
(defun pacmacs--record-action (action-name)
(add-to-list 'pacmacs--recorded-actions
@@ -62,12 +98,13 @@
(pacmacs--measure-time
(pacmacs-tick)))
- (if (not pacmacs--recorded-actions)
- (pacmacs-quit)
- (-let ((((action . tick-number) . _) pacmacs--recorded-actions))
- (when (= tick-number pacmacs--tick-counter)
- (funcall action)
- (setq pacmacs--recorded-actions (cdr pacmacs--recorded-actions))))))
+ (if pacmacs--recorded-actions
+ (-let ((((action . tick-number) . _) pacmacs--recorded-actions))
+ (when (= tick-number pacmacs--tick-counter)
+ (funcall action)
+ (setq pacmacs--recorded-actions (cdr pacmacs--recorded-actions))))
+ (pacmacs-quit)
+ (run-hooks 'pacmacs-replay-finished-hook)))
(define-derived-mode pacmacs-it-recorder-mode pacmacs-mode
"pacmacs-it-recorder-mode"
(define-key pacmacs-it-recorder-mode-map (kbd "<up>") 'pacmacs-record-up)
@@ -92,3 +129,7 @@
(setq pacmacs--recorded-actions (pacmacs--load-test-case filename))
(setq pacmacs--tick-counter 0)
(setq pacmacs--tick-times nil))
+
+(provide 'pacmacs-rr)
+
+;;; pacmacs-rr.el ends here
- [nongnu] elpa/pacmacs 24ddb1b9ad 303/472: Merge pull request #160 from codingteam/terrified-ghost-state-153, (continued)
- [nongnu] elpa/pacmacs 24ddb1b9ad 303/472: Merge pull request #160 from codingteam/terrified-ghost-state-153, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5cb14f20fd 301/472: UT for pacmacs--replace-game-objects (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 00b3223066 305/472: Handle ghost bling threshold (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d608708f15 311/472: UT for handle-ghost-blinking-threshold (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2297996e29 323/472: Smarter running away algorithm (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9b714e4678 321/472: Fix pacmacs--track-object UT (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 16a6ac7e98 327/472: UT for pacmacs--render-track-board, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 729de2de92 329/472: Remove big from the first level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 556098da2e 337/472: Put big pills level before w/o BP ones (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 151da84fdc 338/472: Remove replace-game-object function (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c4c2fbfa6f 347/472: Merge branch 'master' into unterrified-original-possition-171,
ELPA Syncer <=
- [nongnu] elpa/pacmacs 9375a8a3e7 351/472: Merge branch 'master' into unterrified-original-possition-171, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 51a2ac25fe 354/472: Merge pull request #175 from codingteam/maps-with-big-pills-162, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 470f11b433 357/472: Reset terrified timer on eating BP (#173), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 46219c3370 368/472: Smaller default weight for walls (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 52f1ba4237 366/472: Regenerate gradiate for walls (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a36eb746ce 379/472: Fix put-wall-tile-corner UT (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e0a315600b 383/472: Get rid of redundant code (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b19ed92514 389/472: Add UT for color-hex-gradient, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 56e280cd51 395/472: Add Usage section for att.el script, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8ec58f38d9 394/472: Add Usage section for compile.el script, ELPA Syncer, 2022/01/06