Skip to content

Commit

Permalink
Merge pull request #263 from yanganto/test/ring
Browse files Browse the repository at this point in the history
Upgrate Ring testcases
  • Loading branch information
hackfisher authored Feb 15, 2020
2 parents ac93bd2 + b5c2b97 commit 95518ea
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .maintain/ci/build_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case $TARGET in
# Without WASM
"native")
# There is some issue to build on ci server with SKIP_WASM_BUILD=1
cargo build --release --all --locked "$@"
cargo build --all --locked "$@"
echo -e "\e[0;32m +-------------+ \n\e[0;32m | Native Pass | \n\e[0;32m +-------------+ \e[0m"
;;

Expand Down
2 changes: 1 addition & 1 deletion .maintain/ci/darwinia_test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ case $TARGET in
# Without WASM
"native")
# There is some issue to build on ci server with SKIP_WASM_BUILD=1
cargo test -p darwinia-${1}
TARGET=native cargo test -p darwinia-${1}
echo -e "\e[0;32m +------------+ \n\e[0;32m | ${1} Pass | \n\e[0;32m +------------+ \e[0m"
;;

Expand Down
12 changes: 1 addition & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ language: rust
rust:
- nightly

cache:
cargo: true
directories:
- target

branches:
only:
- master
Expand All @@ -19,12 +14,11 @@ env:
before_install:
# Check how much space we've got on this machine.
- df -h
# TODO: cache the toolchain
- rustup target add wasm32-unknown-unknown

jobs:
include:
- stage: Check
- stage: Check & Prepare
script: .maintain/ci/fmt_script.sh

- stage: Build
Expand All @@ -51,10 +45,6 @@ jobs:
env: RUST_TOOLCHAIN=nightly TARGET=native
script: .maintain/ci/test_script.sh

# clean up cache
- stage: Cleanup
script: cargo clean

after_script:
# Check how much free disk space left after the build
- df -h
2 changes: 1 addition & 1 deletion frame/balances/kton/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::cell::RefCell;

use darwinia_ring as ring;
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
use sp_core::H256;
use sp_io;
Expand All @@ -14,7 +15,6 @@ use sp_runtime::{
};

use crate::*;
use darwinia_ring as ring;

pub type AccountId = u64;
pub type Balance = u128;
Expand Down
3 changes: 3 additions & 0 deletions frame/balances/ring/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ use sp_runtime::{
};
use std::cell::RefCell;

pub type Ring = Module<Test>;

use frame_system as system;
impl_outer_origin! {
pub enum Origin for Test {}
Expand Down Expand Up @@ -88,6 +90,7 @@ impl frame_system::Trait for Test {
type Version = ();
type ModuleToIndex = ();
}

parameter_types! {
pub const TransactionBaseFee: u64 = 0;
pub const TransactionByteFee: u64 = 1;
Expand Down
Loading

0 comments on commit 95518ea

Please sign in to comment.