Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrate Ring testcases #263

Merged
merged 2 commits into from
Feb 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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